Differences between revisions 1 and 2
Revision 1 as of 2020-10-23 17:51:36
Size: 1367
Editor: AugieFackler
Comment:
Revision 2 as of 2020-10-23 17:51:51
Size: 1374
Editor: AugieFackler
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
= Accept Process = = Config Alias Cleanups =

Config Alias Cleanups

Note:

This page is primarily intended for developers of Mercurial.

1. Overview

Mercurial has an internal config-aliasing feature that lets us rename config values. This has facilitated cleaning up some of the disorganized config sections and making things more discoverable or readable (since we can rename config names to contain dashes).

2. Known Issues

If we have a hypothetical knob ui.frobnicate and we want to move it to commands.frobnicate-yes, we add an alias. But now it's unclear which knob wins if the user has an hgrc file that contains both. We need to:

  • Define the order in which they apply
  • Have an affordance for users to identify and clean up their legacy-named configs
  • Warn users when they have colliding config names
  • Have a way to avoid bogus warnings when enterprise-managed configs (eg /etc/hgrc.d/* files) disagree with ~/.hgrc about config names.

3. Proposed solutions

  • Add an hg debug-lint-config command (name should probably be improved) to enumerate legacy-name config entries

  • Runtime warning (when not in HGPLAIN mode) that can be disabled by a config knob to warn users when they have the same item under multiple names
  • Coalesce config entries when loading configs, so that it's only an issue if the same config knob occurs in the same "level" of config (eg system, user, repo).

ConfigAliasCleanupsRequired (last edited 2020-10-23 17:51:51 by AugieFackler)