[PATCH 32 of 36] context: remove unnecessary check of instance

Sean Farley sean.michael.farley at gmail.com
Wed Aug 7 13:13:32 CDT 2013


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1375819891 18000
#      Tue Aug 06 15:11:31 2013 -0500
# Node ID 694d2e6f3368073b1f734b778923c8f1bd657b44
# Parent  a5f653299fe868847e7fd22d94ecb6505bc34a93
context: remove unnecessary check of instance

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -130,11 +130,11 @@
 
     def diff(self, ctx2=None, match=None, **opts):
         """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(),
                           match=match, opts=diffopts)
 


More information about the Mercurial-devel mailing list