[Updated] D10586: revlog: use revlog.display_id in integrity error

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue May 11 17:07:25 UTC 2021


Closed by commit rHG0a66eef0ed97: revlog: use revlog.display_id in integrity error (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10586?vs=27501&id=27832

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

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

AFFECTED FILES
  mercurial/revlog.py
  tests/test-lfs.t
  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
@@ -351,7 +351,7 @@
   checking manifests
   crosschecking files in changesets and manifests
   checking files
-   base64 at 0: unpacking 794cee7777cb: integrity check failed on data/base64.i:0
+   base64 at 0: unpacking 794cee7777cb: integrity check failed on data/base64:0
   checked 1 changesets with 1 changes to 1 files
   1 integrity errors encountered!
   (first damaged changeset appears to be 0)
diff --git a/tests/test-lfs.t b/tests/test-lfs.t
--- a/tests/test-lfs.t
+++ b/tests/test-lfs.t
@@ -785,8 +785,8 @@
   checking manifests
   crosschecking files in changesets and manifests
   checking files
-   l at 1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0
-   large at 0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0
+   l at 1: unpacking 46a2f24864bc: integrity check failed on data/l:0
+   large at 0: unpacking 2c531e0992ff: integrity check failed on data/large:0
   checked 5 changesets with 10 changes to 4 files
   2 integrity errors encountered!
   (first damaged changeset appears to be 0)
@@ -895,9 +895,9 @@
   checking manifests
   crosschecking files in changesets and manifests
   checking files
-   l at 1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0
+   l at 1: unpacking 46a2f24864bc: integrity check failed on data/l:0
   lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store
-   large at 0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0
+   large at 0: unpacking 2c531e0992ff: integrity check failed on data/large:0
   lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store
   lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store
   checked 5 changesets with 10 changes to 4 files
@@ -939,8 +939,8 @@
   checking manifests
   crosschecking files in changesets and manifests
   checking files
-   l at 1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0
-   large at 0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0
+   l at 1: unpacking 46a2f24864bc: integrity check failed on data/l:0
+   large at 0: unpacking 2c531e0992ff: integrity check failed on data/large:0
   checked 5 changesets with 10 changes to 4 files
   2 integrity errors encountered!
   (first damaged changeset appears to be 0)
@@ -965,9 +965,9 @@
   checking manifests
   crosschecking files in changesets and manifests
   checking files
-   l at 1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0
+   l at 1: unpacking 46a2f24864bc: integrity check failed on data/l:0
   lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store
-   large at 0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0
+   large at 0: unpacking 2c531e0992ff: integrity check failed on data/large:0
   lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store
   lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store
   checked 5 changesets with 10 changes to 4 files
@@ -985,7 +985,7 @@
 Accessing a corrupt file will complain
 
   $ hg --cwd fromcorrupt2 cat -r 0 large
-  abort: integrity check failed on data/large.i:0
+  abort: integrity check failed on data/large:0
   [50]
 
 lfs -> normal -> lfs round trip conversions are possible.  The 'none()'
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1941,7 +1941,7 @@
                     revornode = templatefilters.short(hex(node))
                 raise error.RevlogError(
                     _(b"integrity check failed on %s:%s")
-                    % (self._indexfile, pycompat.bytestr(revornode))
+                    % (self.display_id, pycompat.bytestr(revornode))
                 )
         except error.RevlogError:
             if self._censorable and storageutil.iscensoredtext(text):



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


More information about the Mercurial-patches mailing list