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