comparison mercurial/localrepo.py @ 51044:940445de2b09

revlog: skip opener options to pass compression_engine value We can directly set the option in the config object now.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 10 Oct 2023 10:03:26 +0200
parents 8228e8dd96dd
children 7d66621c5349
comparison
equal deleted inserted replaced
51043:8228e8dd96dd 51044:940445de2b09
1147 # strickly speaking, revlog seems to support mixed compression style. 1147 # strickly speaking, revlog seems to support mixed compression style.
1148 # 1148 #
1149 # The compression used for new entries will be "the last one" 1149 # The compression used for new entries will be "the last one"
1150 prefix = r.startswith 1150 prefix = r.startswith
1151 if prefix(b'revlog-compression-') or prefix(b'exp-compression-'): 1151 if prefix(b'revlog-compression-') or prefix(b'exp-compression-'):
1152 options[b'compengine'] = r.split(b'-', 2)[2] 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') 1154 options[b'zlib.level'] = ui.configint(b'storage', b'revlog.zlib.level')
1155 if options[b'zlib.level'] is not None: 1155 if options[b'zlib.level'] is not None:
1156 if not (0 <= options[b'zlib.level'] <= 9): 1156 if not (0 <= options[b'zlib.level'] <= 9):
1157 msg = _(b'invalid value for `storage.revlog.zlib.level` config: %d') 1157 msg = _(b'invalid value for `storage.revlog.zlib.level` config: %d')