side-data: drop the associated config and requirements
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 03 May 2021 12:30:24 +0200
changeset 47229 21b3e6116bd1
parent 47228 e51392acd70c
child 47230 0e9105bf54cb
side-data: drop the associated config and requirements This is no longer and extensions of revlog v1, but a part of revlog v2. We no longer needs independent config and requirement management for that. Differential Revision: https://phab.mercurial-scm.org/D10620
mercurial/configitems.py
mercurial/localrepo.py
mercurial/requirements.py
mercurial/upgrade_utils/actions.py
rust/hg-core/src/requirements.rs
tests/test-copies-chain-merge.t
--- a/mercurial/configitems.py	Mon May 03 12:30:14 2021 +0200
+++ b/mercurial/configitems.py	Mon May 03 12:30:24 2021 +0200
@@ -1370,12 +1370,6 @@
 )
 coreconfigitem(
     b'format',
-    b'exp-use-side-data',
-    default=False,
-    experimental=True,
-)
-coreconfigitem(
-    b'format',
     b'use-share-safe',
     default=False,
 )
--- a/mercurial/localrepo.py	Mon May 03 12:30:14 2021 +0200
+++ b/mercurial/localrepo.py	Mon May 03 12:30:24 2021 +0200
@@ -1066,9 +1066,6 @@
     if sparserevlog:
         options[b'generaldelta'] = True
 
-    sidedata = requirementsmod.SIDEDATA_REQUIREMENT in requirements
-    options[b'side-data'] = sidedata
-
     maxchainlen = None
     if sparserevlog:
         maxchainlen = revlogconst.SPARSE_REVLOG_MAX_CHAIN_LENGTH
@@ -1221,7 +1218,6 @@
         requirementsmod.TREEMANIFEST_REQUIREMENT,
         requirementsmod.COPIESSDC_REQUIREMENT,
         requirementsmod.REVLOGV2_REQUIREMENT,
-        requirementsmod.SIDEDATA_REQUIREMENT,
         requirementsmod.SPARSEREVLOG_REQUIREMENT,
         requirementsmod.NODEMAP_REQUIREMENT,
         bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT,
@@ -3517,16 +3513,10 @@
         if ui.configbool(b'format', b'sparse-revlog'):
             requirements.add(requirementsmod.SPARSEREVLOG_REQUIREMENT)
 
-    # 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'):
         requirements.add(requirementsmod.TREEMANIFEST_REQUIREMENT)
--- a/mercurial/requirements.py	Mon May 03 12:30:14 2021 +0200
+++ b/mercurial/requirements.py	Mon May 03 12:30:24 2021 +0200
@@ -41,10 +41,6 @@
 # This is why once a repository has enabled sparse-read, it becomes required.
 SPARSEREVLOG_REQUIREMENT = b'sparserevlog'
 
-# A repository with the sidedataflag requirement will allow to store extra
-# 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'
--- a/mercurial/upgrade_utils/actions.py	Mon May 03 12:30:14 2021 +0200
+++ b/mercurial/upgrade_utils/actions.py	Mon May 03 12:30:24 2021 +0200
@@ -935,7 +935,6 @@
     """
     supported = {
         requirements.SPARSEREVLOG_REQUIREMENT,
-        requirements.SIDEDATA_REQUIREMENT,
         requirements.COPIESSDC_REQUIREMENT,
         requirements.NODEMAP_REQUIREMENT,
         requirements.SHARESAFE_REQUIREMENT,
@@ -966,7 +965,6 @@
         requirements.REVLOGV1_REQUIREMENT,  # allowed in case of downgrade
         requirements.STORE_REQUIREMENT,
         requirements.SPARSEREVLOG_REQUIREMENT,
-        requirements.SIDEDATA_REQUIREMENT,
         requirements.COPIESSDC_REQUIREMENT,
         requirements.NODEMAP_REQUIREMENT,
         requirements.SHARESAFE_REQUIREMENT,
@@ -996,7 +994,6 @@
         requirements.FNCACHE_REQUIREMENT,
         requirements.GENERALDELTA_REQUIREMENT,
         requirements.SPARSEREVLOG_REQUIREMENT,
-        requirements.SIDEDATA_REQUIREMENT,
         requirements.COPIESSDC_REQUIREMENT,
         requirements.NODEMAP_REQUIREMENT,
         requirements.SHARESAFE_REQUIREMENT,
--- a/rust/hg-core/src/requirements.rs	Mon May 03 12:30:14 2021 +0200
+++ b/rust/hg-core/src/requirements.rs	Mon May 03 12:30:24 2021 +0200
@@ -124,11 +124,6 @@
 #[allow(unused)]
 pub(crate) const SPARSEREVLOG_REQUIREMENT: &str = "sparserevlog";
 
-/// A repository with the sidedataflag requirement will allow to store extra
-/// information for revision without altering their original hashes.
-#[allow(unused)]
-pub(crate) const SIDEDATA_REQUIREMENT: &str = "exp-sidedata-flag";
-
 /// A repository with the the copies-sidedata-changeset requirement will store
 /// copies related information in changeset's sidedata.
 #[allow(unused)]
--- a/tests/test-copies-chain-merge.t	Mon May 03 12:30:14 2021 +0200
+++ b/tests/test-copies-chain-merge.t	Mon May 03 12:30:24 2021 +0200
@@ -1669,7 +1669,7 @@
   requirements
      preserved: * (glob)
      removed: revlogv1
-     added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag
+     added: exp-copies-sidedata-changeset, exp-revlogv2.2
   
   processed revlogs:
     - all-filelogs
@@ -1708,7 +1708,7 @@
   requirements
      preserved: * (glob)
      removed: revlogv1
-     added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag
+     added: exp-copies-sidedata-changeset, exp-revlogv2.2
   
   processed revlogs:
     - all-filelogs