# HG changeset patch # User Martin von Zweigbergk # Date 1522564288 25200 # Node ID 3c7c13e75663f0d6e47eaa88d7499c9397aec27d # Parent 4e573e7e512d4df1c421a343e1271f354adfba5c status: use context-returning revpair() Differential Revision: https://phab.mercurial-scm.org/D3010 diff -r 4e573e7e512d -r 3c7c13e75663 mercurial/commands.py --- a/mercurial/commands.py Sat Mar 31 23:49:44 2018 -0700 +++ b/mercurial/commands.py Sat Mar 31 23:31:28 2018 -0700 @@ -4877,11 +4877,11 @@ raise error.Abort(msg) elif change: repo = scmutil.unhidehashlikerevs(repo, [change], 'nowarn') - node2 = scmutil.revsingle(repo, change, None).node() - node1 = repo[node2].p1().node() + ctx2 = scmutil.revsingle(repo, change, None) + ctx1 = ctx2.p1() else: repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn') - node1, node2 = scmutil.revpairnodes(repo, revs) + ctx1, ctx2 = scmutil.revpair(repo, revs) if pats or ui.configbool('commands', 'status.relative'): cwd = repo.getcwd() @@ -4904,16 +4904,16 @@ else: show = states[:5] - m = scmutil.match(repo[node2], pats, opts) + m = scmutil.match(ctx2, pats, opts) if terse: # we need to compute clean and unknown to terse - stat = repo.status(node1, node2, m, + stat = repo.status(ctx1.node(), ctx2.node(), m, 'ignored' in show or 'i' in terse, True, True, opts.get('subrepos')) stat = cmdutil.tersedir(stat, terse) else: - stat = repo.status(node1, node2, m, + stat = repo.status(ctx1.node(), ctx2.node(), m, 'ignored' in show, 'clean' in show, 'unknown' in show, opts.get('subrepos')) @@ -4921,7 +4921,7 @@ if (opts.get('all') or opts.get('copies') or ui.configbool('ui', 'statuscopies')) and not opts.get('no_status'): - copy = copies.pathcopies(repo[node1], repo[node2], m) + copy = copies.pathcopies(ctx1, ctx2, m) ui.pager('status') fm = ui.formatter('status', opts)