##// END OF EJS Templates
revlog: skip opener options to pass compression option values...
marmoute -
r51933:7d66621c default
parent child Browse files
Show More
@@ -1151,16 +1151,18 b' def resolverevlogstorevfsoptions(ui, req'
1151 1151 if prefix(b'revlog-compression-') or prefix(b'exp-compression-'):
1152 1152 feature_config.compression_engine = r.split(b'-', 2)[2]
1153 1153
1154 options[b'zlib.level'] = ui.configint(b'storage', b'revlog.zlib.level')
1155 if options[b'zlib.level'] is not None:
1156 if not (0 <= options[b'zlib.level'] <= 9):
1154 zlib_level = ui.configint(b'storage', b'revlog.zlib.level')
1155 if zlib_level is not None:
1156 if not (0 <= zlib_level <= 9):
1157 1157 msg = _(b'invalid value for `storage.revlog.zlib.level` config: %d')
1158 raise error.Abort(msg % options[b'zlib.level'])
1159 options[b'zstd.level'] = ui.configint(b'storage', b'revlog.zstd.level')
1160 if options[b'zstd.level'] is not None:
1161 if not (0 <= options[b'zstd.level'] <= 22):
1158 raise error.Abort(msg % zlib_level)
1159 feature_config.compression_engine_options[b'zlib.level'] = zlib_level
1160 zstd_level = ui.configint(b'storage', b'revlog.zstd.level')
1161 if zstd_level is not None:
1162 if not (0 <= zstd_level <= 22):
1162 1163 msg = _(b'invalid value for `storage.revlog.zstd.level` config: %d')
1163 raise error.Abort(msg % options[b'zstd.level'])
1164 raise error.Abort(msg % zstd_level)
1165 feature_config.compression_engine_options[b'zstd.level'] = zstd_level
1164 1166
1165 1167 if requirementsmod.NARROW_REQUIREMENT in requirements:
1166 1168 options[b'enableellipsis'] = True
@@ -628,11 +628,6 b' class revlog:'
628 628 else:
629 629 new_header = REVLOG_DEFAULT_VERSION
630 630
631 comp_engine_opts = self.feature_config.compression_engine_options
632 if b'zlib.level' in opts:
633 comp_engine_opts[b'zlib.level'] = opts[b'zlib.level']
634 if b'zstd.level' in opts:
635 comp_engine_opts[b'zstd.level'] = opts[b'zstd.level']
636 631 if self._mmaplargeindex and b'mmapindexthreshold' in opts:
637 632 mmapindexthreshold = opts[b'mmapindexthreshold']
638 633 self.data_config.mmap_index_threshold = mmapindexthreshold
General Comments 0
You need to be logged in to leave comments. Login now