1001 if requirementsmod.REVLOGV1_REQUIREMENT in requirements: |
1001 if requirementsmod.REVLOGV1_REQUIREMENT in requirements: |
1002 options[b'revlogv1'] = True |
1002 options[b'revlogv1'] = True |
1003 if requirementsmod.REVLOGV2_REQUIREMENT in requirements: |
1003 if requirementsmod.REVLOGV2_REQUIREMENT in requirements: |
1004 options[b'revlogv2'] = True |
1004 options[b'revlogv2'] = True |
1005 |
1005 |
1006 if b'generaldelta' in requirements: |
1006 if requirementsmod.GENERALDELTA_REQUIREMENT in requirements: |
1007 options[b'generaldelta'] = True |
1007 options[b'generaldelta'] = True |
1008 |
1008 |
1009 # experimental config: format.chunkcachesize |
1009 # experimental config: format.chunkcachesize |
1010 chunkcachesize = ui.configint(b'format', b'chunkcachesize') |
1010 chunkcachesize = ui.configint(b'format', b'chunkcachesize') |
1011 if chunkcachesize is not None: |
1011 if chunkcachesize is not None: |
1198 # for stem compression of long paths. Experiment ended up not |
1198 # for stem compression of long paths. Experiment ended up not |
1199 # being successful (repository sizes went up due to worse delta |
1199 # being successful (repository sizes went up due to worse delta |
1200 # chains), and the code was deleted in 4.6. |
1200 # chains), and the code was deleted in 4.6. |
1201 supportedformats = { |
1201 supportedformats = { |
1202 requirementsmod.REVLOGV1_REQUIREMENT, |
1202 requirementsmod.REVLOGV1_REQUIREMENT, |
1203 b'generaldelta', |
1203 requirementsmod.GENERALDELTA_REQUIREMENT, |
1204 requirementsmod.TREEMANIFEST_REQUIREMENT, |
1204 requirementsmod.TREEMANIFEST_REQUIREMENT, |
1205 requirementsmod.COPIESSDC_REQUIREMENT, |
1205 requirementsmod.COPIESSDC_REQUIREMENT, |
1206 requirementsmod.REVLOGV2_REQUIREMENT, |
1206 requirementsmod.REVLOGV2_REQUIREMENT, |
1207 requirementsmod.SIDEDATA_REQUIREMENT, |
1207 requirementsmod.SIDEDATA_REQUIREMENT, |
1208 requirementsmod.SPARSEREVLOG_REQUIREMENT, |
1208 requirementsmod.SPARSEREVLOG_REQUIREMENT, |
3440 requirements.add(b'revlog-compression-zstd') |
3440 requirements.add(b'revlog-compression-zstd') |
3441 elif compengine != b'zlib': |
3441 elif compengine != b'zlib': |
3442 requirements.add(b'exp-compression-%s' % compengine) |
3442 requirements.add(b'exp-compression-%s' % compengine) |
3443 |
3443 |
3444 if scmutil.gdinitconfig(ui): |
3444 if scmutil.gdinitconfig(ui): |
3445 requirements.add(b'generaldelta') |
3445 requirements.add(requirementsmod.GENERALDELTA_REQUIREMENT) |
3446 if ui.configbool(b'format', b'sparse-revlog'): |
3446 if ui.configbool(b'format', b'sparse-revlog'): |
3447 requirements.add(requirementsmod.SPARSEREVLOG_REQUIREMENT) |
3447 requirements.add(requirementsmod.SPARSEREVLOG_REQUIREMENT) |
3448 |
3448 |
3449 # experimental config: format.exp-use-side-data |
3449 # experimental config: format.exp-use-side-data |
3450 if ui.configbool(b'format', b'exp-use-side-data'): |
3450 if ui.configbool(b'format', b'exp-use-side-data'): |
3458 |
3458 |
3459 revlogv2 = ui.config(b'experimental', b'revlogv2') |
3459 revlogv2 = ui.config(b'experimental', b'revlogv2') |
3460 if revlogv2 == b'enable-unstable-format-and-corrupt-my-data': |
3460 if revlogv2 == b'enable-unstable-format-and-corrupt-my-data': |
3461 requirements.remove(requirementsmod.REVLOGV1_REQUIREMENT) |
3461 requirements.remove(requirementsmod.REVLOGV1_REQUIREMENT) |
3462 # generaldelta is implied by revlogv2. |
3462 # generaldelta is implied by revlogv2. |
3463 requirements.discard(b'generaldelta') |
3463 requirements.discard(requirementsmod.GENERALDELTA_REQUIREMENT) |
3464 requirements.add(requirementsmod.REVLOGV2_REQUIREMENT) |
3464 requirements.add(requirementsmod.REVLOGV2_REQUIREMENT) |
3465 # experimental config: format.internal-phase |
3465 # experimental config: format.internal-phase |
3466 if ui.configbool(b'format', b'internal-phase'): |
3466 if ui.configbool(b'format', b'internal-phase'): |
3467 requirements.add(requirementsmod.INTERNAL_PHASE_REQUIREMENT) |
3467 requirements.add(requirementsmod.INTERNAL_PHASE_REQUIREMENT) |
3468 |
3468 |