comparison mercurial/upgrade_utils/actions.py @ 46627:f4c325bf80fc

requirements: also add a generaldelta constant Continue the cleanup to the remaining requirements Differential Revision: https://phab.mercurial-scm.org/D10106
author Rapha?l Gom?s <rgomes@octobus.net>
date Wed, 03 Mar 2021 12:30:23 +0100
parents ee91966aec0f
children c3773636ddbb
comparison
equal deleted inserted replaced
46626:ee91966aec0f 46627:f4c325bf80fc
18 18
19 from ..utils import compression 19 from ..utils import compression
20 20
21 # list of requirements that request a clone of all revlog if added/removed 21 # list of requirements that request a clone of all revlog if added/removed
22 RECLONES_REQUIREMENTS = { 22 RECLONES_REQUIREMENTS = {
23 b'generaldelta', 23 requirements.GENERALDELTA_REQUIREMENT,
24 requirements.SPARSEREVLOG_REQUIREMENT, 24 requirements.SPARSEREVLOG_REQUIREMENT,
25 } 25 }
26 26
27 27
28 def preservedrequirements(repo): 28 def preservedrequirements(repo):
234 234
235 @registerformatvariant 235 @registerformatvariant
236 class generaldelta(requirementformatvariant): 236 class generaldelta(requirementformatvariant):
237 name = b'generaldelta' 237 name = b'generaldelta'
238 238
239 _requirement = b'generaldelta' 239 _requirement = requirements.GENERALDELTA_REQUIREMENT
240 240
241 default = True 241 default = True
242 242
243 description = _( 243 description = _(
244 b'deltas within internal storage are unable to ' 244 b'deltas within internal storage are unable to '
934 Extensions should monkeypatch this to add their custom requirements. 934 Extensions should monkeypatch this to add their custom requirements.
935 """ 935 """
936 supported = { 936 supported = {
937 b'dotencode', 937 b'dotencode',
938 b'fncache', 938 b'fncache',
939 b'generaldelta', 939 requirements.GENERALDELTA_REQUIREMENT,
940 requirements.REVLOGV1_REQUIREMENT, 940 requirements.REVLOGV1_REQUIREMENT,
941 b'store', 941 b'store',
942 requirements.SPARSEREVLOG_REQUIREMENT, 942 requirements.SPARSEREVLOG_REQUIREMENT,
943 requirements.SIDEDATA_REQUIREMENT, 943 requirements.SIDEDATA_REQUIREMENT,
944 requirements.COPIESSDC_REQUIREMENT, 944 requirements.COPIESSDC_REQUIREMENT,
965 future, unknown requirements from accidentally being added. 965 future, unknown requirements from accidentally being added.
966 """ 966 """
967 supported = { 967 supported = {
968 b'dotencode', 968 b'dotencode',
969 b'fncache', 969 b'fncache',
970 b'generaldelta', 970 requirements.GENERALDELTA_REQUIREMENT,
971 requirements.SPARSEREVLOG_REQUIREMENT, 971 requirements.SPARSEREVLOG_REQUIREMENT,
972 requirements.SIDEDATA_REQUIREMENT, 972 requirements.SIDEDATA_REQUIREMENT,
973 requirements.COPIESSDC_REQUIREMENT, 973 requirements.COPIESSDC_REQUIREMENT,
974 requirements.NODEMAP_REQUIREMENT, 974 requirements.NODEMAP_REQUIREMENT,
975 requirements.SHARESAFE_REQUIREMENT, 975 requirements.SHARESAFE_REQUIREMENT,