Patchwork D3012: scmutil: deprecate revpairnodes()

login
register
mail settings
Submitter phabricator
Date April 1, 2018, 7:11 a.m.
Message ID <differential-rev-PHID-DREV-qki635lgoajsbxurhgzc-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30107/
State Superseded
Headers show

Comments

phabricator - April 1, 2018, 7:11 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - April 1, 2018, 10:32 a.m.
yuja added a comment.


  One more `revpairnodes()` in tests/autodiff.py.
  
  Queued the other patches, thanks.

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel
phabricator - April 1, 2018, 4:32 p.m.
martinvonz added a comment.


  In https://phab.mercurial-scm.org/D3012#48707, @yuja wrote:
  
  > One more `revpairnodes()` in tests/autodiff.py.
  >
  > Queued the other patches, thanks.
  
  
  Oops, I had actually fixed that, but I had the patches out of order in my stack and ended up not sending it. Sent as https://phab.mercurial-scm.org/D3013 now. Thanks for noticing.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -447,6 +447,7 @@ 
     return tree and tree[0] in ('range', 'rangepre', 'rangepost', 'rangeall')
 
 def revpairnodes(repo, revs):
+    repo.ui.deprecwarn("revpairnodes is deprecated, please use revpair", "4.6")
     ctx1, ctx2 = revpair(repo, revs)
     return ctx1.node(), ctx2.node()