[PATCH 1 of 2] hgweb: forward arguments to ui.config

Yuya Nishihara yuya at tcha.org
Tue Jul 4 09:34:19 EDT 2017


On Mon, 03 Jul 2017 15:55:46 +0200, David Demelier wrote:
> # HG changeset patch
> # User David Demelier <demelier.david at gmail.com>
> # Date 1498646251 -7200
> #      Wed Jun 28 12:37:31 2017 +0200
> # Node ID 2d7f5d2ab80c85251baea4fb49c13aac64f07763
> # Parent  4d780d510b44ad2ae3bb39f3816c95598704d1eb
> hgweb: forward arguments to ui.config
> 
> diff -r 4d780d510b44 -r 2d7f5d2ab80c mercurial/hgweb/hgweb_mod.py
> --- a/mercurial/hgweb/hgweb_mod.py	Tue Jun 27 00:01:17 2017 -0700
> +++ b/mercurial/hgweb/hgweb_mod.py	Wed Jun 28 12:37:31 2017 +0200
> @@ -119,21 +119,21 @@
>          self.csp, self.nonce = cspvalues(self.repo.ui)
>  
>      # Trust the settings from the .hg/hgrc files by default.
> -    def config(self, section, name, default=None, untrusted=True):
> -        return self.repo.ui.config(section, name, default,
> -                                   untrusted=untrusted)
> +    def config(self, *args, **kwargs):
> +        kwargs.setdefault('untrusted', True)
> +        return self.repo.ui.config(*args, **kwargs)

What if untrusted is passed as a positional argument?


More information about the Mercurial-devel mailing list