comparison mercurial/commands.py @ 37769:6a7ff5816c5f

bundle: introduce per-engine compression level If experimental.bundlecomplevel.$engine is set, prefer it over the generic experimental.bundlecomplevel. Given that compression levels have widely different meanings across engines, this allows much saner configuration. Differential Revision: https://phab.mercurial-scm.org/D3393
author Joerg Sonnenberger <joerg@bec.de>
date Tue, 17 Apr 2018 03:07:01 +0200
parents 5527aa808dea
children 141017c7f7a9
comparison
equal deleted inserted replaced
37768:5527aa808dea 37769:6a7ff5816c5f
1258 # TODO compression options should be derived from bundlespec parsing. 1258 # TODO compression options should be derived from bundlespec parsing.
1259 # This is a temporary hack to allow adjusting bundle compression 1259 # This is a temporary hack to allow adjusting bundle compression
1260 # level without a) formalizing the bundlespec changes to declare it 1260 # level without a) formalizing the bundlespec changes to declare it
1261 # b) introducing a command flag. 1261 # b) introducing a command flag.
1262 compopts = {} 1262 compopts = {}
1263 complevel = ui.configint('experimental', 'bundlecomplevel') 1263 complevel = ui.configint('experimental',
1264 'bundlecomplevel.' + bundlespec.compression)
1265 if complevel is None:
1266 complevel = ui.configint('experimental', 'bundlecomplevel')
1264 if complevel is not None: 1267 if complevel is not None:
1265 compopts['level'] = complevel 1268 compopts['level'] = complevel
1266 1269
1267 # Allow overriding the bundling of obsmarker in phases through 1270 # Allow overriding the bundling of obsmarker in phases through
1268 # configuration while we don't have a bundle version that include them 1271 # configuration while we don't have a bundle version that include them