[PATCH] hgweb: allow web.templates to be a list

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Jul 14 20:47:00 EDT 2016



On 07/11/2016 04:35 PM, Yuya Nishihara wrote:
> On Mon, 11 Jul 2016 08:30:23 -0400, Augie Fackler wrote:
>> On Mon, Jul 11, 2016 at 8:26 AM, Yuya Nishihara <yuya at tcha.org> wrote:
>>> On Fri, 8 Jul 2016 16:07:11 -0700, Ross Light via Mercurial-devel wrote:  
>>>> # HG changeset patch
>>>> # User Ross Light <light at google.com>
>>>> # Date 1468018129 25200
>>>> #      Fri Jul 08 15:48:49 2016 -0700
>>>> # Node ID 0611009f75ac6e0c661207927ed9606b83b56d28
>>>> # Parent  b4d117cee636be8a566f56e84d4b351a736a1299
>>>> hgweb: allow web.templates to be a list  
>>>  
>>>> diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
>>>> --- a/mercurial/hgweb/hgweb_mod.py
>>>> +++ b/mercurial/hgweb/hgweb_mod.py
>>>> @@ -99,7 +99,7 @@
>>>>          # we use untrusted=False to prevent a repo owner from using
>>>>          # web.templates in .hg/hgrc to get access to any file readable
>>>>          # by the user running the CGI script
>>>> -        self.templatepath = self.config('web', 'templates', untrusted=False)
>>>> +        self.templatepath = self.configlist('web', 'templates',
>>>> untrusted=False)  
>>>
>>> This is a behavior change because web.templates may contain spaces. Windows
>>> people are likely to put spaces in a filename.  
>>
>> Would it be worth adding a web.extratemplatedirs that is a list for this reason?
> 
> or introduce new config and deprecate web.templates?
> 
> IIRC, last time we did it for [paths] at 8cbb59124e67, I got a few bug reports
> to TortoiseHg, which said a path containing space no longer works.

+1. I totally expect people to have used whatever list separator we use
for some directory name.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list