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' ) +@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]