# HG changeset patch # User Sean Farley # Date 2013-08-06 20:11:42 # Node ID 00140039bd8f0941f83cdf2ca1e86ef371ddd7f7 # Parent f58235d85d6b36e54e1e45128130e09917ede964 localrepo: remove unnecessary check of instance The refactoring of all the context objects allows us to simply pass a basectx to the __new__ constructor and have it return the same object without allocating new memory. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1457,14 +1457,8 @@ class localrepository(object): 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['.']