Patchwork D3005: scmutil: introduce deprecated alias for revpair()

login
register
mail settings
Submitter phabricator
Date April 1, 2018, 10:37 a.m.
Message ID <88636094cdcfe27ac4db4db299950d9b@localhost.localdomain>
Download mbox | patch
Permalink /patch/30111/
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 rHG7c0f40f4f7bf: scmutil: introduce deprecated alias for revpair() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3005?vs=7485&id=7493

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

AFFECTED FILES
  hgext/extdiff.py
  mercurial/commands.py
  mercurial/fileset.py
  mercurial/scmutil.py
  tests/autodiff.py

CHANGE DETAILS




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

Patch

diff --git a/tests/autodiff.py b/tests/autodiff.py
--- a/tests/autodiff.py
+++ b/tests/autodiff.py
@@ -40,7 +40,7 @@ 
     else:
         raise error.Abort(b'--git must be yes, no or auto')
 
-    node1, node2 = scmutil.revpair(repo, [])
+    node1, node2 = scmutil.revpairnodes(repo, [])
     m = scmutil.match(repo[node2], pats, opts)
     it = patch.diff(repo, node1, node2, match=m, opts=diffopts,
                     losedatafn=losedatafn)
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -446,6 +446,9 @@ 
     tree = revsetlang.parse(revspec)
     return tree and tree[0] in ('range', 'rangepre', 'rangepost', 'rangeall')
 
+def revpairnodes(repo, revs):
+    return revpair(repo, revs)
+
 def revpair(repo, revs):
     if not revs:
         return repo.dirstate.p1(), None
diff --git a/mercurial/fileset.py b/mercurial/fileset.py
--- a/mercurial/fileset.py
+++ b/mercurial/fileset.py
@@ -513,7 +513,7 @@ 
     revspec = getstring(r, reverr)
     if not revspec:
         raise error.ParseError(reverr)
-    basenode, node = scmutil.revpair(repo, [baserevspec, revspec])
+    basenode, node = scmutil.revpairnodes(repo, [baserevspec, revspec])
     basectx = repo[basenode]
     ctx = repo[node]
     return getset(mctx.switch(ctx, _buildstatus(ctx, x, basectx=basectx)), x)
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1878,7 +1878,7 @@ 
         node1 = repo[node2].p1().node()
     else:
         repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn')
-        node1, node2 = scmutil.revpair(repo, revs)
+        node1, node2 = scmutil.revpairnodes(repo, revs)
 
     if reverse:
         node1, node2 = node2, node1
@@ -4880,7 +4880,7 @@ 
         node1 = repo[node2].p1().node()
     else:
         repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn')
-        node1, node2 = scmutil.revpair(repo, revs)
+        node1, node2 = scmutil.revpairnodes(repo, revs)
 
     if pats or ui.configbool('commands', 'status.relative'):
         cwd = repo.getcwd()
diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -171,7 +171,7 @@ 
         node2 = scmutil.revsingle(repo, change, None).node()
         node1a, node1b = repo.changelog.parents(node2)
     else:
-        node1a, node2 = scmutil.revpair(repo, revs)
+        node1a, node2 = scmutil.revpairnodes(repo, revs)
         if not revs:
             node1b = repo.dirstate.p2()
         else: