Patchwork D6945: sidedatacopies: add a new requirement for storing copies into sidedata

login
register
mail settings
Submitter phabricator
Date Oct. 8, 2019, 12:38 a.m.
Message ID <e2248b60199624d7d4676036e3e30116@localhost.localdomain>
Download mbox | patch
Permalink /patch/42085/
State Not Applicable
Headers show

Comments

phabricator - Oct. 8, 2019, 12:38 a.m.
marmoute updated this revision to Diff 16949.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6945?vs=16777&id=16949

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6945/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6945

AFFECTED FILES
  mercurial/configitems.py
  mercurial/localrepo.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -442,6 +442,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.
@@ -999,6 +1003,7 @@ 
         b'revlogv1',
         b'generaldelta',
         b'treemanifest',
+        COPIESSDC_REQUIREMENT,
         REVLOGV2_REQUIREMENT,
         SIDEDATA_REQUIREMENT,
         SPARSEREVLOG_REQUIREMENT,
@@ -3515,6 +3520,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')
 
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -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(