##// END OF EJS Templates
scmutil: introduce deprecated alias for revpair()...
Martin von Zweigbergk -
r37268:7c0f40f4 default
parent child Browse files
Show More
@@ -171,7 +171,7 b' def dodiff(ui, repo, cmdline, pats, opts'
171 171 node2 = scmutil.revsingle(repo, change, None).node()
172 172 node1a, node1b = repo.changelog.parents(node2)
173 173 else:
174 node1a, node2 = scmutil.revpair(repo, revs)
174 node1a, node2 = scmutil.revpairnodes(repo, revs)
175 175 if not revs:
176 176 node1b = repo.dirstate.p2()
177 177 else:
@@ -1878,7 +1878,7 b' def diff(ui, repo, *pats, **opts):'
1878 1878 node1 = repo[node2].p1().node()
1879 1879 else:
1880 1880 repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn')
1881 node1, node2 = scmutil.revpair(repo, revs)
1881 node1, node2 = scmutil.revpairnodes(repo, revs)
1882 1882
1883 1883 if reverse:
1884 1884 node1, node2 = node2, node1
@@ -4880,7 +4880,7 b' def status(ui, repo, *pats, **opts):'
4880 4880 node1 = repo[node2].p1().node()
4881 4881 else:
4882 4882 repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn')
4883 node1, node2 = scmutil.revpair(repo, revs)
4883 node1, node2 = scmutil.revpairnodes(repo, revs)
4884 4884
4885 4885 if pats or ui.configbool('commands', 'status.relative'):
4886 4886 cwd = repo.getcwd()
@@ -513,7 +513,7 b' def status(mctx, x):'
513 513 revspec = getstring(r, reverr)
514 514 if not revspec:
515 515 raise error.ParseError(reverr)
516 basenode, node = scmutil.revpair(repo, [baserevspec, revspec])
516 basenode, node = scmutil.revpairnodes(repo, [baserevspec, revspec])
517 517 basectx = repo[basenode]
518 518 ctx = repo[node]
519 519 return getset(mctx.switch(ctx, _buildstatus(ctx, x, basectx=basectx)), x)
@@ -446,6 +446,9 b' def _pairspec(revspec):'
446 446 tree = revsetlang.parse(revspec)
447 447 return tree and tree[0] in ('range', 'rangepre', 'rangepost', 'rangeall')
448 448
449 def revpairnodes(repo, revs):
450 return revpair(repo, revs)
451
449 452 def revpair(repo, revs):
450 453 if not revs:
451 454 return repo.dirstate.p1(), None
@@ -40,7 +40,7 b' def autodiff(ui, repo, *pats, **opts):'
40 40 else:
41 41 raise error.Abort(b'--git must be yes, no or auto')
42 42
43 node1, node2 = scmutil.revpair(repo, [])
43 node1, node2 = scmutil.revpairnodes(repo, [])
44 44 m = scmutil.match(repo[node2], pats, opts)
45 45 it = patch.diff(repo, node1, node2, match=m, opts=diffopts,
46 46 losedatafn=losedatafn)
General Comments 0
You need to be logged in to leave comments. Login now