Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
48770:f19be290756a | 48771:79a967128055 |
---|---|
3693 if createopts.get(b'sharedrelative'): | 3693 if createopts.get(b'sharedrelative'): |
3694 requirements.add(requirementsmod.RELATIVE_SHARED_REQUIREMENT) | 3694 requirements.add(requirementsmod.RELATIVE_SHARED_REQUIREMENT) |
3695 else: | 3695 else: |
3696 requirements.add(requirementsmod.SHARED_REQUIREMENT) | 3696 requirements.add(requirementsmod.SHARED_REQUIREMENT) |
3697 | 3697 |
3698 tracked_key = ui.configint(b'format', b'exp-dirstate-tracked-key-version') | 3698 if ui.configbool(b'format', b'dirstate-tracked-key'): |
3699 if tracked_key: | 3699 version = ui.configint(b'format', b'dirstate-tracked-key.version') |
3700 if tracked_key != 1: | 3700 msg = _("ignoring unknown tracked key version: %d\n") |
3701 msg = _("ignoring unknown tracked key version: %d\n") | 3701 hint = _("see `hg help config.format.exp-dirstate-tracked-key-version") |
3702 hint = _( | 3702 if version != 1: |
3703 "see `hg help config.format.exp-dirstate-tracked-key-version" | 3703 ui.warn(msg % version, hint=hint) |
3704 ) | |
3705 ui.warn(msg % tracked_key, hint=hint) | |
3706 else: | 3704 else: |
3707 requirements.add(requirementsmod.DIRSTATE_TRACKED_KEY_V1) | 3705 requirements.add(requirementsmod.DIRSTATE_TRACKED_KEY_V1) |
3708 | 3706 |
3709 return requirements | 3707 return requirements |
3710 | 3708 |