Mercurial > hg-stable
changeset 43137:81efc4a295e7
sidedatacopies: add a new requirement for storing copies into sidedata
The end goal is to have changesets centric sidedata information stored into
changelog sidedata. This make it possible to use the changeset based copy
tracing algorithm on any repository without affecting hashes.
The actual implementation is coming. The feature is marked as experimental
(do not use in production) until we stabilise details about the format.
Differential Revision: https://phab.mercurial-scm.org/D6945
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 06 Oct 2019 23:36:51 -0400 |
parents | ba5b062a1388 |
children | f9dc98a97cdb |
files | mercurial/configitems.py mercurial/localrepo.py |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/configitems.py Sun Oct 06 23:36:51 2019 -0400 +++ b/mercurial/configitems.py Sun Oct 06 23:36:51 2019 -0400 @@ -748,6 +748,12 @@ b'format', b'usestore', default=True, ) coreconfigitem( + b'format', + b'exp-use-copies-side-data-changeset', + default=False, + experimental=True, +) +coreconfigitem( b'format', b'use-side-data', default=False, experimental=True, ) coreconfigitem(
--- a/mercurial/localrepo.py Sun Oct 06 23:36:51 2019 -0400 +++ b/mercurial/localrepo.py Sun Oct 06 23:36:51 2019 -0400 @@ -440,6 +440,10 @@ # information for revision without altering their original hashes. SIDEDATA_REQUIREMENT = b'exp-sidedata-flag' +# A repository with the the copies-sidedata-changeset requirement will store +# copies related information in changeset's sidedata. +COPIESSDC_REQUIREMENT = b'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. @@ -997,6 +1001,7 @@ b'revlogv1', b'generaldelta', b'treemanifest', + COPIESSDC_REQUIREMENT, REVLOGV2_REQUIREMENT, SIDEDATA_REQUIREMENT, SPARSEREVLOG_REQUIREMENT, @@ -3512,6 +3517,10 @@ # experimental config: format.use-side-data if ui.configbool(b'format', b'use-side-data'): requirements.add(SIDEDATA_REQUIREMENT) + # experimental config: format.exp-use-copies-side-data-changeset + if ui.configbool(b'format', b'exp-use-copies-side-data-changeset'): + requirements.add(SIDEDATA_REQUIREMENT) + requirements.add(COPIESSDC_REQUIREMENT) if ui.configbool(b'experimental', b'treemanifest'): requirements.add(b'treemanifest')