[PATCH 1 of 2] hgwebdir: read --webdir-conf as actual configuration to ui

Alexander Solovyov piranha at piranha.org.ua
Mon Apr 20 12:13:38 CDT 2009


On Mon, Apr 20, 2009 at 1:59 PM, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:
> Finally, a review! A few nits.
>
> More global commentary: this takes care of the problems with paths.
> Are you sure that other sections of hgrc won't make trouble? Have you
> thought long and hard about what sections exist and what options in
> them we may have to ignore/reset for this kind of thing? There are so
> many options in use throughout the codebase...

Yes, I've looked at whole mercurial.hgweb module and it uses paths,
collections, server.uncompressed and web. So no clashes with non-hgweb
configuration except of paths.

>> +        # not sure this is necessary here
>> +        # looks like parentui always is almost clean
>> +        if parentui and parentui.configitems('paths'):
>> +            parentui.cdata.drop_section('paths')
>
> Right. Where are we getting the parentui from? I guess hg serve
> --webdir-config populates it? In the mod_wsgi and other cases, it
> shouldn't matter.

parentui can contain paths from ~/.hgrc or from system-wide config,
so I looks like it should be cleaned up.

>> +        if self.repos:
>> +            return
>
> This check is pointless, right? We set it to be empty just prior to this.

No, it's not. It checks the case when we've received list of repos instead of
config.

-- 
Alexander


More information about the Mercurial-devel mailing list