> On Sep 16, 2017, at 2:28 PM, Boris Feld <boris.f...@octobus.net> wrote:
> 
> # HG changeset patch
> # User Boris Feld <boris.f...@octobus.net>
> # Date 1505496068 -7200
> #      ven. sept. 15 19:21:08 2017 +0200
> # Node ID 8f9210de17d825ec69c4cdb266398b941a088275
> # Parent  709b44f38ab919c4f858f12807b9f01f6a2ee888
> # EXP-Topic config.register.web
> web: use '_unset' default value for proxy config method
> 
> This special value is needed to make sure registered default value are taken 
> in
> account.
> 
> diff -r 709b44f38ab9 -r 8f9210de17d8 mercurial/hgweb/hgwebdir_mod.py
> --- a/mercurial/hgweb/hgwebdir_mod.py mar. sept. 12 09:13:02 2017 -0700
> +++ b/mercurial/hgweb/hgwebdir_mod.py ven. sept. 15 19:21:08 2017 +0200
> @@ -491,7 +491,7 @@
>             else:
>                 yield config('web', 'motd', '')
> 
> -        def config(section, name, default=None, untrusted=True):
> +        def config(section, name, default=uimod._unset, untrusted=True):

Using the _-prefixed unset singleton here is a hint that there’s some kind of 
layering violation here. it honestly looks like we could get rid of this entire 
proxy method.

(approving anyway, but a thought for future config-related cleanup.)

>             return self.ui.config(section, name, default, untrusted)
> 
>         self.updatereqenv(req.env)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to