Patchwork D3007: extdiff: use context-returning revpair()

login
register
mail settings
Submitter phabricator
Date April 1, 2018, 10:37 a.m.
Message ID <2f9be47dddb6638c09db7bad69523ba2@localhost.localdomain>
Download mbox | patch
Permalink /patch/30109/
State Not Applicable
Headers show

Comments

phabricator - April 1, 2018, 10:37 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6089ef933ab5: extdiff: use context-returning revpair() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3007?vs=7487&id=7495

REVISION DETAIL
  https://phab.mercurial-scm.org/D3007

AFFECTED FILES
  hgext/extdiff.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -168,14 +168,18 @@ 
         msg = _('cannot specify --rev and --change at the same time')
         raise error.Abort(msg)
     elif change:
-        node2 = scmutil.revsingle(repo, change, None).node()
-        node1a, node1b = repo.changelog.parents(node2)
+        ctx2 = scmutil.revsingle(repo, change, None)
+        ctx1a, ctx1b = ctx2.p1(), ctx2.p2()
     else:
-        node1a, node2 = scmutil.revpairnodes(repo, revs)
+        ctx1a, ctx2 = scmutil.revpair(repo, revs)
         if not revs:
-            node1b = repo.dirstate.p2()
+            ctx1b = repo[None].p2()
         else:
-            node1b = nullid
+            ctx1b = repo[nullid]
+
+    node1a = ctx1a.node()
+    node1b = ctx1b.node()
+    node2 = ctx2.node()
 
     # Disable 3-way merge if there is only one parent
     if do3way: