Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGddf50e82e21a: diff: use context-returning revpair()
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (3 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
msg = _('cannot specify --rev and --change at the same time') | msg = _('cannot specify --rev and --change at the same time') | ||||
raise error.Abort(msg) | raise error.Abort(msg) | ||||
elif change: | elif change: | ||||
repo = scmutil.unhidehashlikerevs(repo, [change], 'nowarn') | repo = scmutil.unhidehashlikerevs(repo, [change], 'nowarn') | ||||
node2 = scmutil.revsingle(repo, change, None).node() | node2 = scmutil.revsingle(repo, change, None).node() | ||||
node1 = repo[node2].p1().node() | node1 = repo[node2].p1().node() | ||||
else: | else: | ||||
repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn') | repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn') | ||||
node1, node2 = scmutil.revpairnodes(repo, revs) | ctx1, ctx2 = scmutil.revpair(repo, revs) | ||||
node1, node2 = ctx1.node(), ctx2.node() | |||||
if reverse: | if reverse: | ||||
node1, node2 = node2, node1 | node1, node2 = node2, node1 | ||||
diffopts = patch.diffallopts(ui, opts) | diffopts = patch.diffallopts(ui, opts) | ||||
m = scmutil.match(repo[node2], pats, opts) | m = scmutil.match(repo[node2], pats, opts) | ||||
ui.pager('diff') | ui.pager('diff') | ||||
logcmdutil.diffordiffstat(ui, repo, diffopts, node1, node2, m, stat=stat, | logcmdutil.diffordiffstat(ui, repo, diffopts, node1, node2, m, stat=stat, |