[PATCH 03 of 14 RFC] changctx: use new nodeorctx method in diff
Sean Farley
sean.michael.farley at gmail.com
Tue Jul 9 16:54:34 CDT 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1373323158 18000
# Mon Jul 08 17:39:18 2013 -0500
# Node ID 6724e421bc24d936a6ce57ceb941612be4867d66
# Parent bf0f87c072f524b8e054de72af143a0dfc2fcffb
changctx: use new nodeorctx method in diff
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -369,12 +369,12 @@
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):
- ctx2 = self._repo[ctx2]
+ if ctx2 is not None:
+ ctx2 = nodeorctx(self._repo, ctx2)
diffopts = patch.diffopts(self._repo.ui, opts)
return patch.diff(self._repo, ctx2.node(), self.node(),
match=match, opts=diffopts)
@propertycache
More information about the Mercurial-devel
mailing list