revlogv2: make sure bundling pick a compatible bundle format
Before this change, revlog-v2 repository where bundled using the incompatible
"v1" format.
Differential Revision: https://phab.mercurial-scm.org/D10802
--- a/mercurial/bundlecaches.py Sun May 30 20:42:51 2021 +0200
+++ b/mercurial/bundlecaches.py Sun May 30 22:12:48 2021 +0200
@@ -167,6 +167,8 @@
# Generaldelta repos require v2.
if requirementsmod.GENERALDELTA_REQUIREMENT in repo.requirements:
version = b'v2'
+ elif requirementsmod.REVLOGV2_REQUIREMENT in repo.requirements:
+ version = b'v2'
# Modern compression engines require v2.
if compression not in _bundlespecv1compengines:
version = b'v2'
--- a/tests/test-revlog-v2.t Sun May 30 20:42:51 2021 +0200
+++ b/tests/test-revlog-v2.t Sun May 30 22:12:48 2021 +0200
@@ -69,6 +69,14 @@
.hg/store/data/foo.i:
0000: 00 00 de ad |....|
+Bundle use a compatible changegroup format
+------------------------------------------
+
+ $ hg bundle --all ../basic.hg
+ 1 changesets found
+ $ hg debugbundle --spec ../basic.hg
+ bzip2-v2
+
The expected files are generated
--------------------------------