[PATCH 33 of 36] localrepo: remove unnecessary check of instance
Sean Farley
sean.michael.farley at gmail.com
Wed Aug 7 13:13:33 CDT 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1375819902 18000
# Tue Aug 06 15:11:42 2013 -0500
# Node ID bd8df6c75e6930a88eaa06c341ed92b50122f6de
# Parent 694d2e6f3368073b1f734b778923c8f1bd657b44
localrepo: remove unnecessary check of instance
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1455,18 +1455,12 @@
for fn in mf.keys():
if not match(fn):
del mf[fn]
return mf
- 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['.']
match = match or matchmod.always(self.root, self.getcwd())
listignored, listclean, listunknown = ignored, clean, unknown
More information about the Mercurial-devel
mailing list