[Updated] D10858: revlogv2: fix `hg verify` with revlog v2

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Mon Jun 21 15:16:26 UTC 2021


Closed by commit rHG9cecc222c536: revlogv2: fix `hg verify` with revlog v2 (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/D10858?vs=28628&id=28658

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

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

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

CHANGE DETAILS

diff --git a/tests/test-revlog-v2.t b/tests/test-revlog-v2.t
--- a/tests/test-revlog-v2.t
+++ b/tests/test-revlog-v2.t
@@ -119,3 +119,21 @@
 The two repository should be identical, this diff MUST be empty
 
   $ cmp ../tip-new ../tip-cloned || diff -U8 ../tip-new ../tip-cloned
+
+
+hg verify should be happy
+-------------------------
+
+  $ hg verify
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  checked 1 changesets with 1 changes to 1 files
+
+  $ hg verify -R ../cloned-repo
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  checked 1 changesets with 1 changes to 1 files
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -2828,8 +2828,15 @@
 
     def files(self):
         res = [self._indexfile]
-        if not self._inline:
-            res.append(self._datafile)
+        if self._docket_file is None:
+            if not self._inline:
+                res.append(self._datafile)
+        else:
+            res.append(self._docket_file)
+            if self._docket.data_end:
+                res.append(self._datafile)
+            if self._docket.sidedata_end:
+                res.append(self._sidedatafile)
         return res
 
     def emitrevisions(



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/20210621/70cf6aaf/attachment-0002.html>


More information about the Mercurial-patches mailing list