[Request] [++ ] D10915: upgrade_utils: add support for enabling internal phases during upgrade
Mathiasdm (Mathias De Maré)
phabricator at mercurial-scm.org
Mon Jun 28 12:44:34 UTC 2021
Mathiasdm created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This makes it possible to start using soft strip on an existing repository,
if the following is set in the configuration:
[format]
internal-phase=yes
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10915
AFFECTED FILES
mercurial/upgrade_utils/actions.py
CHANGE DETAILS
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: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210628/a96c4b4e/attachment.html>
More information about the Mercurial-patches
mailing list