Mercurial > hg
diff hgext/extdiff.py @ 37251:7c0f40f4f7bf
scmutil: introduce deprecated alias for revpair()
revsingle() returns a context object, revpair() returns nodeids,
revrange() returns integer revisions (in a revset). I'm going to
reduce this inconsistency by making revpair() return context
objects. Changing the return type is not nice to extensions, so this
patch introduces a nodeid-returning version of revpair() that they can
detect and use. Update callers to the new function so we can change
revpair() itself and then migrate them back one by one.
Differential Revision: https://phab.mercurial-scm.org/D3005
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 31 Mar 2018 23:37:25 -0700 |
parents | 2208149c4b8e |
children | 6089ef933ab5 |
line wrap: on
line diff
--- a/hgext/extdiff.py Sat Mar 31 23:58:08 2018 -0400 +++ b/hgext/extdiff.py Sat Mar 31 23:37:25 2018 -0700 @@ -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: