# HG changeset patch # User Sean Farley # Date 2013-08-06 20:11:31 # Node ID f58235d85d6b36e54e1e45128130e09917ede964 # Parent 49b128e50e8496e295493cb38978d33fe440f364 basectx: 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/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -132,7 +132,7 @@ class basectx(object): """Returns a diff generator for the given contexts and matcher""" if ctx2 is None: ctx2 = self.p1() - if ctx2 is not None and not isinstance(ctx2, changectx): + if ctx2 is not None: ctx2 = self._repo[ctx2] diffopts = patch.diffopts(self._repo.ui, opts) return patch.diff(self._repo, ctx2.node(), self.node(),