comparison mercurial/localrepo.py @ 46309:2c9c88879ab7

persistent-node: check the value of the slow-path config We should probably provide some standard for this in config item, but this is a quest for another adventure. Differential Revision: https://phab.mercurial-scm.org/D9760
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 13 Jan 2021 18:33:48 +0100
parents 7d096e5a5b90
children fc2d5c0aed7f
comparison
equal deleted inserted replaced
46308:05a1e44b2224 46309:2c9c88879ab7
1042 options[b'enableellipsis'] = True 1042 options[b'enableellipsis'] = True
1043 1043
1044 if ui.configbool(b'experimental', b'rust.index'): 1044 if ui.configbool(b'experimental', b'rust.index'):
1045 options[b'rust.index'] = True 1045 options[b'rust.index'] = True
1046 if requirementsmod.NODEMAP_REQUIREMENT in requirements: 1046 if requirementsmod.NODEMAP_REQUIREMENT in requirements:
1047 slow_path = ui.config(
1048 b'storage', b'revlog.persistent-nodemap.slow-path'
1049 )
1050 if slow_path not in (b'allow'):
1051 default = ui.config_default(
1052 b'storage', b'revlog.persistent-nodemap.slow-path'
1053 )
1054 msg = _(
1055 b'unknown value for config '
1056 b'"storage.revlog.persistent-nodemap.slow-path": "%s"\n'
1057 )
1058 ui.warn(msg % slow_path)
1059 if not ui.quiet:
1060 ui.warn(_(b'falling back to default value: %s\n') % default)
1061 slow_path = default
1047 options[b'persistent-nodemap'] = True 1062 options[b'persistent-nodemap'] = True
1048 if ui.configbool(b'storage', b'revlog.persistent-nodemap.mmap'): 1063 if ui.configbool(b'storage', b'revlog.persistent-nodemap.mmap'):
1049 options[b'persistent-nodemap.mmap'] = True 1064 options[b'persistent-nodemap.mmap'] = True
1050 epnm = ui.config(b'storage', b'revlog.nodemap.mode') 1065 epnm = ui.config(b'storage', b'revlog.nodemap.mode')
1051 options[b'persistent-nodemap.mode'] = epnm 1066 options[b'persistent-nodemap.mode'] = epnm