Patchwork [32,of,36] context: remove unnecessary check of instance

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <694d2e6f3368073b1f73.1375899212@laptop.local>
Download mbox | patch
Permalink /patch/2049/
State Superseded
Commit c744e8217274ad945c505a1689bb6baddd5382ca
Delegated to: Augie Fackler
Headers show

Comments

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

Patch

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)