changeset 47158:e1936ae27897

revlog: use revlog.display_id for corruption error Differential Revision: https://phab.mercurial-scm.org/D10584
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:23:58 +0200
parents 3a9f3470922c
children 1ec64f59dc27
files mercurial/revlog.py tests/test-verify.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Mon May 03 12:23:48 2021 +0200
+++ b/mercurial/revlog.py	Mon May 03 12:23:58 2021 +0200
@@ -578,7 +578,7 @@
                         index.update_nodemap_data(*nodemap_data)
         except (ValueError, IndexError):
             raise error.RevlogError(
-                _(b"index %s is corrupted") % self._indexfile
+                _(b"index %s is corrupted") % self.display_id
             )
         self.index, self._chunkcache = d
         if not self._chunkcache:
--- a/tests/test-verify.t	Mon May 03 12:23:48 2021 +0200
+++ b/tests/test-verify.t	Mon May 03 12:23:58 2021 +0200
@@ -297,7 +297,7 @@
   checking manifests
   crosschecking files in changesets and manifests
   checking files
-   a@1: broken revlog! (index data/a.i is corrupted)
+   a@1: broken revlog! (index data/a is corrupted)
   warning: orphan data file 'data/a.i'
   checked 2 changesets with 0 changes to 1 files
   1 warnings encountered!