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

login
register
mail settings
Submitter Augie Fackler
Date June 27, 2017, 11:19 p.m.
Message ID <E040D486-CDA3-4590-8A2F-8E48BF7417FC@durin42.com>
Download mbox | patch
Permalink /patch/21789/
State Superseded
Headers show

Comments

Augie Fackler - June 27, 2017, 11:19 p.m.
Dropped this series for now:


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@gmail.com> wrote:
> 
> # HG changeset patch
> # User David Demelier <markand@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@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

--- /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"