changeset 19568:f58235d85d6b

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.
author Sean Farley <sean.michael.farley@gmail.com>
date Tue, 06 Aug 2013 15:11:31 -0500
parents 49b128e50e84
children 00140039bd8f
files mercurial/context.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Mon Aug 05 18:42:41 2013 -0500
+++ b/mercurial/context.py	Tue Aug 06 15:11:31 2013 -0500
@@ -132,7 +132,7 @@
         """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(),