diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -733,6 +733,10 @@ coreconfigitem('format', 'usestore', default=True, ) +coreconfigitem('format', 'exp-use-copies-side-data-changeset', + default=False, + experimental=True, +) coreconfigitem('format', 'use-side-data', default=False, experimental=True, diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -398,6 +398,10 @@ # information for revision without altering their original hashes. SIDEDATA_REQUIREMENT = 'exp-sidedata-flag' +# A repository with the the copies-sidedata-changeset requirement will store +# copies related information in changeset's sidedata. +COPIESSDC_REQUIREMENT = 'exp-copies-sidedata-changeset' + # Functions receiving (ui, features) that extensions can register to impact # the ability to load repositories with custom requirements. Only # functions defined in loaded extensions are called. @@ -923,6 +927,7 @@ 'revlogv1', 'generaldelta', 'treemanifest', + COPIESSDC_REQUIREMENT, REVLOGV2_REQUIREMENT, SIDEDATA_REQUIREMENT, SPARSEREVLOG_REQUIREMENT, @@ -3165,6 +3170,10 @@ # experimental config: format.use-side-data if ui.configbool('format', 'use-side-data'): requirements.add(SIDEDATA_REQUIREMENT) + # experimental config: format.exp-use-copies-side-data-changeset + if ui.configbool('format', 'exp-use-copies-side-data-changeset'): + requirements.add(SIDEDATA_REQUIREMENT) + requirements.add(COPIESSDC_REQUIREMENT) if ui.configbool('experimental', 'treemanifest'): requirements.add('treemanifest')