Mercurial > public > mercurial-scm > hg
diff mercurial/localrepo.py @ 47263:6c84fc9c9a90
changelogv2: introduce a "changelogv2" feature
Right now, this means using revlogv2, but only for the changelog. We will have
the format more unique in future changesets.
Differential Revision: https://phab.mercurial-scm.org/D10660
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 29 Mar 2021 22:40:54 +0200 |
parents | ccdd280d1d0d |
children | a07381751dc9 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Tue May 04 05:18:57 2021 +0200 +++ b/mercurial/localrepo.py Mon Mar 29 22:40:54 2021 +0200 @@ -737,7 +737,10 @@ storevfs = store.vfs storevfs.options = resolvestorevfsoptions(ui, requirements, features) - if requirementsmod.REVLOGV2_REQUIREMENT in requirements: + if ( + requirementsmod.REVLOGV2_REQUIREMENT in requirements + or requirementsmod.CHANGELOGV2_REQUIREMENT in requirements + ): features.add(repository.REPO_FEATURE_SIDE_DATA) # the revlogv2 docket introduced race condition that we need to fix features.discard(repository.REPO_FEATURE_STREAM_CLONE) @@ -1021,6 +1024,8 @@ options[b'revlogv1'] = True if requirementsmod.REVLOGV2_REQUIREMENT in requirements: options[b'revlogv2'] = True + if requirementsmod.CHANGELOGV2_REQUIREMENT in requirements: + options[b'changelogv2'] = True if requirementsmod.GENERALDELTA_REQUIREMENT in requirements: options[b'generaldelta'] = True @@ -1220,6 +1225,7 @@ requirementsmod.TREEMANIFEST_REQUIREMENT, requirementsmod.COPIESSDC_REQUIREMENT, requirementsmod.REVLOGV2_REQUIREMENT, + requirementsmod.CHANGELOGV2_REQUIREMENT, requirementsmod.SPARSEREVLOG_REQUIREMENT, requirementsmod.NODEMAP_REQUIREMENT, bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT, @@ -3529,6 +3535,10 @@ if ui.configbool(b'experimental', b'treemanifest'): requirements.add(requirementsmod.TREEMANIFEST_REQUIREMENT) + changelogv2 = ui.config(b'format', b'exp-use-changelog-v2') + if changelogv2 == b'enable-unstable-format-and-corrupt-my-data': + requirements.add(requirementsmod.CHANGELOGV2_REQUIREMENT) + revlogv2 = ui.config(b'experimental', b'revlogv2') if revlogv2 == b'enable-unstable-format-and-corrupt-my-data': requirements.discard(requirementsmod.REVLOGV1_REQUIREMENT)