changeset 47159:1ec64f59dc27

revlog: use revlog.display_id in ambiguity errors Differential Revision: https://phab.mercurial-scm.org/D10585
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:24:08 +0200
parents e1936ae27897
children 0a66eef0ed97
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Mon May 03 12:23:58 2021 +0200
+++ b/mercurial/revlog.py	Mon May 03 12:24:08 2021 +0200
@@ -1400,7 +1400,7 @@
             # 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 @@
                         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