Patchwork [34,of,36] largefiles: remove unnecessary check of instance

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <727c68355f67032e970a.1375899214@laptop.local>
Download mbox | patch
Permalink /patch/2052/
State Superseded
Commit ee7c58013c070a63108a56875692e9d861c4ea4b
Delegated to: Augie Fackler
Headers show

Comments

Sean Farley - Aug. 7, 2013, 6:13 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1375819809 18000
#      Tue Aug 06 15:10:09 2013 -0500
# Node ID 727c68355f67032e970a5d961d1ee70ecc316f12
# Parent  bd8df6c75e6930a88eaa06c341ed92b50122f6de
largefiles: remove unnecessary check of instance

This also removes the need to import the context module.

Patch

diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py
+++ b/hgext/largefiles/reposetup.py
@@ -8,12 +8,11 @@ 
 
 '''setup for largefiles repositories: reposetup'''
 import copy
 import os
 
-from mercurial import context, error, manifest, match as match_, util, \
-    discovery
+from mercurial import error, manifest, match as match_, util, discovery
 from mercurial import node as node_
 from mercurial.i18n import _
 from mercurial import localrepo
 
 import lfcommands
@@ -90,18 +89,12 @@ 
                 return super(lfilesrepo, self).status(node1, node2, match,
                     listignored, listclean, listunknown, listsubrepos)
             else:
                 # some calls in this function rely on the old version of status
                 self.lfstatus = False
-                if isinstance(node1, context.changectx):
-                    ctx1 = node1
-                else:
-                    ctx1 = self[node1]
-                if isinstance(node2, context.changectx):
-                    ctx2 = node2
-                else:
-                    ctx2 = self[node2]
+                ctx1 = self[node1]
+                ctx2 = self[node2]
                 working = ctx2.rev() is None
                 parentworking = working and ctx1 == self['.']
 
                 def inctx(file, ctx):
                     try: