[Commented On] D10584: revlog: use revlog.display_id for corruption error

baymax (Baymax, Your Personal Patch-care Companion) phabricator at mercurial-scm.org
Tue May 4 01:55:42 UTC 2021


baymax added a comment.
baymax updated this revision to Diff 27499.


  ✅ refresh by Heptapod after a successful CI run (🐙 💚)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10584?vs=27361&id=27499

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10584/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10584

AFFECTED FILES
  mercurial/revlog.py
  tests/test-verify.t

CHANGE DETAILS

diff --git a/tests/test-verify.t b/tests/test-verify.t
--- a/tests/test-verify.t
+++ b/tests/test-verify.t
@@ -297,7 +297,7 @@
   checking manifests
   crosschecking files in changesets and manifests
   checking files
-   a at 1: broken revlog! (index data/a.i is corrupted)
+   a at 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!
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -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:



To: marmoute, indygreg, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210504/0ac7fd02/attachment-0002.html>


More information about the Mercurial-patches mailing list