[PATCH] Allow hgrc [paths] section to traverse the children of the _current_ directory

Greg Ward greg-hg at gerg.ca
Fri Jun 26 07:23:36 CDT 2009


On Thu, Jun 25, 2009 at 5:44 PM, Jonathan Watt<jwatt at jwatt.org> wrote:
> I have various mercurial repositories all stored in the 'hg' directory at
> http://domain.tld/hg/, accessible at URLs like http://domain.tld/hg/repoA/. This
> 'hg' directory, as well as containing repository subdirectories, also contains
> my hgwebdir.cgi and hgweb.config. My hgweb.config would look like:
>
> [paths]
> repoA = repoA
> repoB = repoB
> repoC = repoC
> ...
>
> However, it's a bit tedious and silly to have to keep adding these lines. One
> alternative would be to move hgwebdir.cgi and hgweb.config up a directory, and
> change hgweb.config to contain:
>
> [paths]
> hg = hg/*
>
> Ideally I'd like to leave them where they are and have it contain this though:
>
> [paths]
> . = ./*

I'm not sure you need this feature.  Have you tried configuring
'[collections]'.  E.g. I have configured http://vc.gerg.ca/hg/ with a
two-line hgweb.config:

[collections]
/home/hg = /home/hg

...meaning "export all the hg repos in /home/hg via hgwebdir.cgi".
Works perfectly.  If you want hgweb.config to be location-neutral,
maybe this would work:

[collections]
. = .

?

Greg


More information about the Mercurial-devel mailing list