changeset 46406:95054317e172

revlog: use a less probable revlog version for backwards compatibility This allows us to define a usable v2. Differential Revision: https://phab.mercurial-scm.org/D9902
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 28 Jan 2021 15:12:48 +0100
parents 9fd4f7af42ea
children 095fa99ae5f5
files mercurial/localrepo.py tests/test-requires.t
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Jan 27 15:06:02 2021 +0100
+++ b/mercurial/localrepo.py	Thu Jan 28 15:12:48 2021 +0100
@@ -3639,11 +3639,11 @@
         # effectively locks out old clients and prevents them from
         # mucking with a repo in an unknown format.
         #
-        # The revlog header has version 2, which won't be recognized by
+        # The revlog header has version 65535, which won't be recognized by
         # such old clients.
         hgvfs.append(
             b'00changelog.i',
-            b'\0\0\0\2 dummy changelog to prevent using the old repo '
+            b'\0\0\xFF\xFF dummy changelog to prevent using the old repo '
             b'layout',
         )
 
--- a/tests/test-requires.t	Wed Jan 27 15:06:02 2021 +0100
+++ b/tests/test-requires.t	Thu Jan 28 15:12:48 2021 +0100
@@ -5,7 +5,7 @@
   $ hg commit -m test
   $ rm .hg/requires
   $ hg tip
-  abort: unknown version (2) in revlog 00changelog.i
+  abort: unknown version (65535) in revlog 00changelog.i
   [50]
   $ echo indoor-pool > .hg/requires
   $ hg tip