Mercurial > hg
diff mercurial/localrepo.py @ 46705:fd55a9eb1507
revlogv2: allow upgrading to v2
Revlogv2 implies sidedata.
Right now sidedata is not really used in production, and Revlogv2 will be used
for the first production-ready version of sidedata support.
Differential Revision: https://phab.mercurial-scm.org/D9844
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 20 Jan 2021 21:14:06 +0100 |
parents | 6f4a481f182a |
children | a41565bef69f |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Jan 28 15:28:57 2021 +0100 +++ b/mercurial/localrepo.py Wed Jan 20 21:14:06 2021 +0100 @@ -3447,9 +3447,13 @@ # experimental config: format.exp-use-side-data if ui.configbool(b'format', b'exp-use-side-data'): + requirements.discard(requirementsmod.REVLOGV1_REQUIREMENT) + requirements.add(requirementsmod.REVLOGV2_REQUIREMENT) requirements.add(requirementsmod.SIDEDATA_REQUIREMENT) # experimental config: format.exp-use-copies-side-data-changeset if ui.configbool(b'format', b'exp-use-copies-side-data-changeset'): + requirements.discard(requirementsmod.REVLOGV1_REQUIREMENT) + requirements.add(requirementsmod.REVLOGV2_REQUIREMENT) requirements.add(requirementsmod.SIDEDATA_REQUIREMENT) requirements.add(requirementsmod.COPIESSDC_REQUIREMENT) if ui.configbool(b'experimental', b'treemanifest'): @@ -3457,7 +3461,7 @@ revlogv2 = ui.config(b'experimental', b'revlogv2') if revlogv2 == b'enable-unstable-format-and-corrupt-my-data': - requirements.remove(requirementsmod.REVLOGV1_REQUIREMENT) + requirements.discard(requirementsmod.REVLOGV1_REQUIREMENT) # generaldelta is implied by revlogv2. requirements.discard(requirementsmod.GENERALDELTA_REQUIREMENT) requirements.add(requirementsmod.REVLOGV2_REQUIREMENT)