# HG changeset patch # User Pierre-Yves David # Date 1622405568 -7200 # Node ID dc380056915761939157b6962e14d2b43413d256 # Parent 24ea3ef352388fc7d70d123ab2292c81d46a9d89 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 diff -r 24ea3ef35238 -r dc3800569157 mercurial/bundlecaches.py --- 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' diff -r 24ea3ef35238 -r dc3800569157 tests/test-revlog-v2.t --- 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 --------------------------------