equal
deleted
inserted
replaced
392 # huge amounts of memory, because the whole span would be read at once, |
392 # huge amounts of memory, because the whole span would be read at once, |
393 # including all the intermediate revisions that aren't pertinent for the chain. |
393 # including all the intermediate revisions that aren't pertinent for the chain. |
394 # This is why once a repository has enabled sparse-read, it becomes required. |
394 # This is why once a repository has enabled sparse-read, it becomes required. |
395 SPARSEREVLOG_REQUIREMENT = 'sparserevlog' |
395 SPARSEREVLOG_REQUIREMENT = 'sparserevlog' |
396 |
396 |
|
397 # A repository with the sidedataflag requirement will allow to store extra |
|
398 # information for revision without altering their original hashes. |
|
399 SIDEDATA_REQUIREMENT = 'exp-sidedata-flag' |
|
400 |
397 # Functions receiving (ui, features) that extensions can register to impact |
401 # Functions receiving (ui, features) that extensions can register to impact |
398 # the ability to load repositories with custom requirements. Only |
402 # the ability to load repositories with custom requirements. Only |
399 # functions defined in loaded extensions are called. |
403 # functions defined in loaded extensions are called. |
400 # |
404 # |
401 # The function receives a set of requirement strings that the repository |
405 # The function receives a set of requirement strings that the repository |
812 sparserevlog = SPARSEREVLOG_REQUIREMENT in requirements |
816 sparserevlog = SPARSEREVLOG_REQUIREMENT in requirements |
813 options[b'sparse-revlog'] = sparserevlog |
817 options[b'sparse-revlog'] = sparserevlog |
814 if sparserevlog: |
818 if sparserevlog: |
815 options[b'generaldelta'] = True |
819 options[b'generaldelta'] = True |
816 |
820 |
|
821 sidedata = SIDEDATA_REQUIREMENT in requirements |
|
822 options[b'side-data'] = sidedata |
|
823 |
817 maxchainlen = None |
824 maxchainlen = None |
818 if sparserevlog: |
825 if sparserevlog: |
819 maxchainlen = revlogconst.SPARSE_REVLOG_MAX_CHAIN_LENGTH |
826 maxchainlen = revlogconst.SPARSE_REVLOG_MAX_CHAIN_LENGTH |
820 # experimental config: format.maxchainlen |
827 # experimental config: format.maxchainlen |
821 maxchainlen = ui.configint(b'format', b'maxchainlen', maxchainlen) |
828 maxchainlen = ui.configint(b'format', b'maxchainlen', maxchainlen) |
915 supportedformats = { |
922 supportedformats = { |
916 'revlogv1', |
923 'revlogv1', |
917 'generaldelta', |
924 'generaldelta', |
918 'treemanifest', |
925 'treemanifest', |
919 REVLOGV2_REQUIREMENT, |
926 REVLOGV2_REQUIREMENT, |
|
927 SIDEDATA_REQUIREMENT, |
920 SPARSEREVLOG_REQUIREMENT, |
928 SPARSEREVLOG_REQUIREMENT, |
921 bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT, |
929 bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT, |
922 } |
930 } |
923 _basesupported = supportedformats | { |
931 _basesupported = supportedformats | { |
924 'store', |
932 'store', |
3151 |
3159 |
3152 if scmutil.gdinitconfig(ui): |
3160 if scmutil.gdinitconfig(ui): |
3153 requirements.add('generaldelta') |
3161 requirements.add('generaldelta') |
3154 if ui.configbool('format', 'sparse-revlog'): |
3162 if ui.configbool('format', 'sparse-revlog'): |
3155 requirements.add(SPARSEREVLOG_REQUIREMENT) |
3163 requirements.add(SPARSEREVLOG_REQUIREMENT) |
|
3164 |
|
3165 # experimental config: format.use-side-data |
|
3166 if ui.configbool('format', 'use-side-data'): |
|
3167 requirements.add(SIDEDATA_REQUIREMENT) |
3156 if ui.configbool('experimental', 'treemanifest'): |
3168 if ui.configbool('experimental', 'treemanifest'): |
3157 requirements.add('treemanifest') |
3169 requirements.add('treemanifest') |
3158 |
3170 |
3159 revlogv2 = ui.config('experimental', 'revlogv2') |
3171 revlogv2 = ui.config('experimental', 'revlogv2') |
3160 if revlogv2 == 'enable-unstable-format-and-corrupt-my-data': |
3172 if revlogv2 == 'enable-unstable-format-and-corrupt-my-data': |