Mercurial > hg
diff mercurial/localrepo.py @ 48771:79a967128055
dirstate-tracked-key: update the config value to match latest discussion
Special cases are not special enough, we align the option name on the other.
The `version` value is undocumented for now as it can only have a single value.
It is supported in the code to properly detect and abort if more value are
introduced in the future value.
Differential Revision: https://phab.mercurial-scm.org/D12184
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 15 Feb 2022 05:20:46 +0100 |
parents | 568f63b5a30f |
children | 8bbb1abb9d19 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Nov 26 15:38:04 2021 +0100 +++ b/mercurial/localrepo.py Tue Feb 15 05:20:46 2022 +0100 @@ -3695,14 +3695,12 @@ else: requirements.add(requirementsmod.SHARED_REQUIREMENT) - tracked_key = ui.configint(b'format', b'exp-dirstate-tracked-key-version') - if tracked_key: - if tracked_key != 1: - msg = _("ignoring unknown tracked key version: %d\n") - hint = _( - "see `hg help config.format.exp-dirstate-tracked-key-version" - ) - ui.warn(msg % tracked_key, hint=hint) + if ui.configbool(b'format', b'dirstate-tracked-key'): + version = ui.configint(b'format', b'dirstate-tracked-key.version') + msg = _("ignoring unknown tracked key version: %d\n") + hint = _("see `hg help config.format.exp-dirstate-tracked-key-version") + if version != 1: + ui.warn(msg % version, hint=hint) else: requirements.add(requirementsmod.DIRSTATE_TRACKED_KEY_V1)