# HG changeset patch # User Pierre-Yves David # Date 2021-05-03 10:24:08 # Node ID 1ec64f59dc2756376bca469d82e47a0b5d7d4696 # Parent e1936ae27897fdd5a68bb292936f2770519c0a00 revlog: use revlog.display_id in ambiguity errors Differential Revision: https://phab.mercurial-scm.org/D10585 diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1400,7 +1400,7 @@ class revlog(object): # fast path: for unfiltered changelog, radix tree is accurate if not getattr(self, 'filteredrevs', None): raise error.AmbiguousPrefixLookupError( - id, self._indexfile, _(b'ambiguous identifier') + id, self.display_id, _(b'ambiguous identifier') ) # fall through to slow path that filters hidden revisions except (AttributeError, ValueError): @@ -1426,7 +1426,7 @@ class revlog(object): self._pcache[id] = nl[0] return nl[0] raise error.AmbiguousPrefixLookupError( - id, self._indexfile, _(b'ambiguous identifier') + id, self.display_id, _(b'ambiguous identifier') ) if maybewdir: raise error.WdirUnsupported