equal
deleted
inserted
replaced
915 def gathersupportedrequirements(ui): |
915 def gathersupportedrequirements(ui): |
916 """Determine the complete set of recognized requirements.""" |
916 """Determine the complete set of recognized requirements.""" |
917 # Start with all requirements supported by this file. |
917 # Start with all requirements supported by this file. |
918 supported = set(localrepository._basesupported) |
918 supported = set(localrepository._basesupported) |
919 |
919 |
920 if dirstate.SUPPORTS_DIRSTATE_V2: |
|
921 supported.add(requirementsmod.DIRSTATE_V2_REQUIREMENT) |
|
922 |
|
923 # Execute ``featuresetupfuncs`` entries if they belong to an extension |
920 # Execute ``featuresetupfuncs`` entries if they belong to an extension |
924 # relevant to this ui instance. |
921 # relevant to this ui instance. |
925 modules = {m.__name__ for n, m in extensions.extensions(ui)} |
922 modules = {m.__name__ for n, m in extensions.extensions(ui)} |
926 |
923 |
927 for fn in featuresetupfuncs: |
924 for fn in featuresetupfuncs: |
1264 requirementsmod.CHANGELOGV2_REQUIREMENT, |
1261 requirementsmod.CHANGELOGV2_REQUIREMENT, |
1265 requirementsmod.SPARSEREVLOG_REQUIREMENT, |
1262 requirementsmod.SPARSEREVLOG_REQUIREMENT, |
1266 requirementsmod.NODEMAP_REQUIREMENT, |
1263 requirementsmod.NODEMAP_REQUIREMENT, |
1267 bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT, |
1264 bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT, |
1268 requirementsmod.SHARESAFE_REQUIREMENT, |
1265 requirementsmod.SHARESAFE_REQUIREMENT, |
|
1266 requirementsmod.DIRSTATE_V2_REQUIREMENT, |
1269 } |
1267 } |
1270 _basesupported = supportedformats | { |
1268 _basesupported = supportedformats | { |
1271 requirementsmod.STORE_REQUIREMENT, |
1269 requirementsmod.STORE_REQUIREMENT, |
1272 requirementsmod.FNCACHE_REQUIREMENT, |
1270 requirementsmod.FNCACHE_REQUIREMENT, |
1273 requirementsmod.SHARED_REQUIREMENT, |
1271 requirementsmod.SHARED_REQUIREMENT, |
3607 requirements.add(requirementsmod.SPARSEREVLOG_REQUIREMENT) |
3605 requirements.add(requirementsmod.SPARSEREVLOG_REQUIREMENT) |
3608 |
3606 |
3609 # experimental config: format.exp-dirstate-v2 |
3607 # experimental config: format.exp-dirstate-v2 |
3610 # Keep this logic in sync with `has_dirstate_v2()` in `tests/hghave.py` |
3608 # Keep this logic in sync with `has_dirstate_v2()` in `tests/hghave.py` |
3611 if ui.configbool(b'format', b'exp-dirstate-v2'): |
3609 if ui.configbool(b'format', b'exp-dirstate-v2'): |
3612 if dirstate.SUPPORTS_DIRSTATE_V2: |
3610 requirements.add(requirementsmod.DIRSTATE_V2_REQUIREMENT) |
3613 requirements.add(requirementsmod.DIRSTATE_V2_REQUIREMENT) |
|
3614 else: |
|
3615 raise error.Abort( |
|
3616 _( |
|
3617 b"dirstate v2 format requested by config " |
|
3618 b"but not supported (requires Rust extensions)" |
|
3619 ) |
|
3620 ) |
|
3621 |
3611 |
3622 # experimental config: format.exp-use-copies-side-data-changeset |
3612 # experimental config: format.exp-use-copies-side-data-changeset |
3623 if ui.configbool(b'format', b'exp-use-copies-side-data-changeset'): |
3613 if ui.configbool(b'format', b'exp-use-copies-side-data-changeset'): |
3624 requirements.add(requirementsmod.CHANGELOGV2_REQUIREMENT) |
3614 requirements.add(requirementsmod.CHANGELOGV2_REQUIREMENT) |
3625 requirements.add(requirementsmod.COPIESSDC_REQUIREMENT) |
3615 requirements.add(requirementsmod.COPIESSDC_REQUIREMENT) |