[Updated] D10915: upgrade_utils: add support for enabling internal phases during upgrade
Mathiasdm (Mathias De Maré)
phabricator at mercurial-scm.org
Mon Jun 28 15:17:56 UTC 2021
Mathiasdm edited the summary of this revision.
Mathiasdm updated this revision to Diff 28703.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10915?vs=28702&id=28703
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10915/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10915
AFFECTED FILES
mercurial/upgrade_utils/actions.py
tests/test-copies-chain-merge.t
tests/test-copies-in-changeset.t
tests/test-persistent-nodemap.t
tests/test-sidedata.t
tests/test-upgrade-repo.t
CHANGE DETAILS
diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t
--- a/tests/test-upgrade-repo.t
+++ b/tests/test-upgrade-repo.t
@@ -60,6 +60,7 @@
dirstate-v2: no
dotencode: yes
generaldelta: yes
+ internalphases: no
share-safe: no
sparserevlog: yes
persistent-nodemap: no (no-rust !)
@@ -76,6 +77,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -93,6 +95,7 @@
dirstate-v2: no no no
dotencode: yes no yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -110,6 +113,7 @@
[formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
[formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
[formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
+ [formatvariant.name.uptodate|internalphases: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
[formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
[formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
[formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
@@ -150,6 +154,12 @@
{
"config": false,
"default": false,
+ "name": "internalphases",
+ "repo": false
+ },
+ {
+ "config": false,
+ "default": false,
"name": "share-safe",
"repo": false
},
@@ -340,6 +350,7 @@
dirstate-v2: no
dotencode: no
generaldelta: no
+ internalphases: no
share-safe: no
sparserevlog: no
persistent-nodemap: no
@@ -355,6 +366,7 @@
dirstate-v2: no no no
dotencode: no yes yes
generaldelta: no yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: no yes yes
persistent-nodemap: no no no (no-rust !)
@@ -372,6 +384,7 @@
dirstate-v2: no no no
dotencode: no yes yes
generaldelta: no no yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: no no yes
persistent-nodemap: no no no (no-rust !)
@@ -389,6 +402,7 @@
[formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
[formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
[formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
+ [formatvariant.name.uptodate|internalphases: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
[formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
[formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
[formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
@@ -1372,6 +1386,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -1414,6 +1429,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -1459,6 +1475,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -1510,6 +1527,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -1558,6 +1576,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -1607,6 +1626,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -1644,6 +1664,7 @@
dirstate-v2: no yes no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: yes yes no
@@ -1683,6 +1704,7 @@
dirstate-v2: yes no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: yes yes no
@@ -1723,6 +1745,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: yes yes no
diff --git a/tests/test-sidedata.t b/tests/test-sidedata.t
--- a/tests/test-sidedata.t
+++ b/tests/test-sidedata.t
@@ -55,6 +55,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -72,6 +73,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -95,6 +97,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -112,6 +115,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
diff --git a/tests/test-persistent-nodemap.t b/tests/test-persistent-nodemap.t
--- a/tests/test-persistent-nodemap.t
+++ b/tests/test-persistent-nodemap.t
@@ -60,6 +60,7 @@
dirstate-v2: no
dotencode: yes
generaldelta: yes
+ internalphases: no
share-safe: no
sparserevlog: yes
persistent-nodemap: yes
@@ -581,6 +582,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: yes no no
@@ -631,6 +633,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no yes no
diff --git a/tests/test-copies-in-changeset.t b/tests/test-copies-in-changeset.t
--- a/tests/test-copies-in-changeset.t
+++ b/tests/test-copies-in-changeset.t
@@ -38,6 +38,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -56,6 +57,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -431,6 +433,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -462,6 +465,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -490,6 +494,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
diff --git a/tests/test-copies-chain-merge.t b/tests/test-copies-chain-merge.t
--- a/tests/test-copies-chain-merge.t
+++ b/tests/test-copies-chain-merge.t
@@ -1655,6 +1655,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
@@ -1695,6 +1696,7 @@
dirstate-v2: no no no
dotencode: yes yes yes
generaldelta: yes yes yes
+ internalphases: no no no
share-safe: no no no
sparserevlog: yes yes yes
persistent-nodemap: no no no (no-rust !)
diff --git a/mercurial/upgrade_utils/actions.py b/mercurial/upgrade_utils/actions.py
--- a/mercurial/upgrade_utils/actions.py
+++ b/mercurial/upgrade_utils/actions.py
@@ -235,6 +235,27 @@
b'faster'
)
+ at registerformatvariant
+class internalphases(requirementformatvariant):
+ name = b'internalphases'
+
+ _requirement = requirements.INTERNAL_PHASE_REQUIREMENT
+
+ default = False
+ description = _(
+ b'older repositories do not support '
+ b'internal phases, which makes it impossible to '
+ b'use features like "soft strip"'
+ )
+ upgrademessage = _(
+ b'repository will be able to use internal phases, '
+ b'making features like "soft strip" possible'
+ )
+
+ touches_filelogs = False
+ touches_manifests = False
+ touches_changelog = False
+ touches_requirements = True
@registerformatvariant
class sharesafe(requirementformatvariant):
@@ -979,6 +1000,7 @@
requirements.REVLOGV2_REQUIREMENT,
requirements.CHANGELOGV2_REQUIREMENT,
requirements.DIRSTATE_V2_REQUIREMENT,
+ requirements.INTERNAL_PHASE_REQUIREMENT,
}
for name in compression.compengines:
engine = compression.compengines[name]
@@ -1011,6 +1033,7 @@
requirements.REVLOGV2_REQUIREMENT,
requirements.CHANGELOGV2_REQUIREMENT,
requirements.DIRSTATE_V2_REQUIREMENT,
+ requirements.INTERNAL_PHASE_REQUIREMENT,
}
for name in compression.compengines:
engine = compression.compengines[name]
To: Mathiasdm, #hg-reviewers
Cc: marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210628/e017259b/attachment-0002.html>
More information about the Mercurial-patches
mailing list