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

Jun Wu quark at fb.com
Fri Jun 30 00:40:19 EDT 2017


Excerpts from 's message of 2017-06-28 13:42:13 +0200:
> configitems: add alias support in config
> 
> [...]
> 
> diff -r 247bae545061 -r 9a80ff1ee41c mercurial/configitems.py
> --- a/mercurial/configitems.py    Tue Jun 27 23:50:22 2017 +0900
> +++ b/mercurial/configitems.py    Wed Jun 28 12:44:36 2017 +0200
> @@ -19,9 +19,10 @@
>      :default: default value for this item,
>      """

The above docstring needs update. It seems worthwhile to document what
happens if one of the aliases does not match the main config item.

> [...]
> +verify that aliases are evaluated as well
> +
> +  $ hg init aliastest
> +  $ cd aliastest
> +  $ cat > .hg/hgrc << EOF
> +  > [ui]
> +  > user = repo user
> +  > EOF
> +  $ touch index
> +  $ unset HGUSER
> +  $ hg ci -Am test
> +  adding index
> +  $ hg log --template '{author}\n'
> +  repo user

Might be interesting to have some tests here testing multiple aliases and
the behavior when values do not match.


More information about the Mercurial-devel mailing list