[PATCH 1 of 3] configitems: add alias for 'ui.username'

Augie Fackler raf at durin42.com
Tue Jun 27 19:19:25 EDT 2017


Dropped this series for now:

--- /home/augie/hg/tests/test-newcgi.t
+++ /home/augie/hg/tests/test-newcgi.t.err
@@ -54,6 +54,7 @@
   $ . "$TESTDIR/cgienv"
   $ python hgweb.cgi > page1
   $ python hgwebdir.cgi > page2
+  devel-warn: specifying a default value for a registered config item: 'ui.username' 'None' at: /tmp/hgtests.zFTJI7/install/lib/python/mercurial/hgweb/hgwebdir_mod.py:408 (get)

   $ PATH_INFO="/test/"
   $ PATH_TRANSLATED="/var/something/test.cgi"

ERROR: test-newcgi.t output changed

etc

Full test failure list:
Failed test-hgweb-commands.t: output changed
Failed test-hgweb-no-request-uri.t: output changed
Failed test-hgweb-no-path-info.t: output changed
Failed test-oldcgi.t: output changed
Failed test-newcgi.t: output changed
Failed test-newercgi.t: output changed
Failed test-check-code.t: output changed


> On Jun 27, 2017, at 2:17 PM, David Demelier <demelier.david at gmail.com> wrote:
> 
> # HG changeset patch
> # User David Demelier <markand at malikania.fr>
> # Date 1497954110 -7200
> #      Tue Jun 20 12:21:50 2017 +0200
> # Node ID e79846f1dbf02981993aa524df33a40722c98b72
> # Parent  eb4c49f55f1f0d7719f514c16bec54515eb54f62
> configitems: add alias for 'ui.username'
> 
> diff -r eb4c49f55f1f -r e79846f1dbf0 mercurial/configitems.py
> --- a/mercurial/configitems.py	Sun Jun 25 22:30:14 2017 -0700
> +++ b/mercurial/configitems.py	Tue Jun 20 12:21:50 2017 +0200
> @@ -19,9 +19,10 @@
>     :default: default value for this item,
>     """
> 
> -    def __init__(self, section, name, default=None):
> +    def __init__(self, section, name, alias=None, default=None):
>         self.section = section
>         self.name = name
> +        self.alias = alias
>         self.default = default
> 
> coreitems = {}
> @@ -48,3 +49,6 @@
> coreconfigitem('ui', 'quiet',
>     default=False,
> )
> +coreconfigitem('ui', 'username',
> +    alias=[('ui', 'user')]
> +)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list