D6945: sidedatacopies: add a new requirement for storing copies into sidedata
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Oct 3 05:55:17 UTC 2019
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6945
AFFECTED FILES
mercurial/configitems.py
mercurial/localrepo.py
CHANGE DETAILS
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')
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,
To: marmoute, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list