diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5174,7 +5174,7 @@ def status(ui, repo, *pats, **opts): msg = _('cannot specify --rev and --change at the same time') raise util.Abort(msg) elif change: - node2 = repo.lookup(change) + node2 = scmutil.revsingle(repo, change, None).node() node1 = repo[node2].p1().node() else: node1, node2 = scmutil.revpair(repo, revs) diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -263,9 +263,9 @@ hg status -C --change 1 added modified c modified R removed -hg status -A --change 1: +hg status -A --change 1 and revset: - $ hg status -A --change 1 + $ hg status -A --change '1|1' M modified A added A copied