diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -1333,7 +1333,7 @@ def node_(repo, subset, x): else: rn = None try: - pm = repo.changelog._partialmatch(n) + pm = scmutil.resolvehexnodeidprefix(repo, n) if pm is not None: rn = repo.changelog.rev(pm) except LookupError: diff --git a/tests/test-revset.t b/tests/test-revset.t --- a/tests/test-revset.t +++ b/tests/test-revset.t @@ -1874,9 +1874,9 @@ Test short 'ff...' hash collision $ hg debugrevspec '0:wdir() & fffb' abort: 00changelog.i@fffb: ambiguous identifier! [255] -BROKEN should be '2' (node lookup uses unfiltered repo since dc25ed84bee8) +BROKEN should be '2' (node lookup uses unfiltered repo) $ hg debugrevspec '0:wdir() & id(fffb)' - 2 +BROKEN should be '2' (node lookup uses unfiltered repo) $ hg debugrevspec '0:wdir() & ffff8' 4 $ hg debugrevspec '0:wdir() & fffff'