[PATCH 2 of 2] configitems: add alias support in config

Yuya Nishihara yuya at tcha.org
Tue Jul 4 09:44:22 EDT 2017


On Mon, 03 Jul 2017 15:55:47 +0200, David Demelier wrote:
> # HG changeset patch
> # User David Demelier <demelier.david at gmail.com>
> # Date 1499079875 -7200
> #      Mon Jul 03 13:04:35 2017 +0200
> # Node ID 160c36de3dd036409b3954b95290f4a22493ac64
> # Parent  2d7f5d2ab80c85251baea4fb49c13aac64f07763
> configitems: add alias support in config
> 
> Aliases define optional alternatives to existing options. For example the old
> option ui.user was deprecated and replaced by ui.username. With this mechanism,
> it's even possible to create an alias to an option in a different section.
> 
> Add ui.user as alias to ui.username as an example of this concept.
> 
> The old alternates principle in ui.config is removed as it was used only for
> this option.

This looks good to me. Does this depend on the previous patch? If not, I'll
queue it.

Please flag as an "(API)" change if you resend.

> diff -r 2d7f5d2ab80c -r 160c36de3dd0 tests/test-config-alias.t
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/tests/test-config-alias.t	Mon Jul 03 13:04:35 2017 +0200

Perhaps the test could be folded into test-config.t, which is pretty small.


More information about the Mercurial-devel mailing list