D10030: revlogv2: temporarily forbid inline revlogs

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Fri Feb 19 11:17:44 UTC 2021


Alphare created this revision.
Herald added a reviewer: indygreg.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  See inline comments. I plan to fix the underlying issue before revlogv2 is
  stabilized.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -58,8 +58,8 @@
 
   $ f --hexdump --bytes 4 .hg/store/00changelog.i
   .hg/store/00changelog.i:
-  0000: 00 01 00 02                                     |....|
+  0000: 00 00 00 02                                     |....|
 
   $ f --hexdump --bytes 4 .hg/store/data/foo.i
   .hg/store/data/foo.i:
-  0000: 00 01 00 02                                     |....|
+  0000: 00 00 00 02                                     |....|
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -530,7 +530,7 @@
         opts = self.opener.options
 
         if b'revlogv2' in opts:
-            newversionflags = REVLOGV2 | FLAG_INLINE_DATA
+            newversionflags = REVLOGV2
         elif b'revlogv1' in opts:
             newversionflags = REVLOGV1 | FLAG_INLINE_DATA
             if b'generaldelta' in opts:
@@ -645,7 +645,11 @@
                     % (flags >> 16, fmt, self.indexfile)
                 )
 
-            self._inline = versionflags & FLAG_INLINE_DATA
+            # There is a bug in the transaction handling when going from an
+            # inline revlog to a separate index and data file. Turn it off until
+            # it's fixed, since v2 revlogs sometimes get rewritten on exchange.
+            # See issue6485
+            self._inline = False
             # generaldelta implied by version 2 revlogs.
             self._generaldelta = True
 



To: Alphare, indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list