[PATCH 1 of 2 RFC] hgweb: support multiple directories for the same path
Matt Mackall
mpm at selenic.com
Wed Mar 16 03:49:26 UTC 2011
On Tue, 2011-03-15 at 21:35 -0500, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at gmail.com>
> # Date 1300241217 -3600
> # Node ID d1b2d37302564f3638fe96478952e47778284b73
> # Parent 0652b2da832daada866a68f7a4359227570c2447
> hgweb: support multiple directories for the same path
>
> [paths]
> /dir = /path/1/*, /path/2/*
I like it, though things will get interesting if there are duplicates?
> diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
> --- a/mercurial/hgweb/hgwebdir_mod.py
> +++ b/mercurial/hgweb/hgwebdir_mod.py
> @@ -77,7 +77,10 @@ class hgwebdir(object):
> if not os.path.exists(self.conf):
> raise util.Abort(_('config file %s not found!') % self.conf)
> u.readconfig(self.conf, remap=map, trust=True)
> - paths = u.configitems('hgweb-paths')
> + paths = []
> + for name, ignored in u.configitems('hgweb-paths'):
> + for path in u.configlist('hgweb-paths', name):
> + paths.append((name, path))
> elif isinstance(self.conf, (list, tuple)):
> paths = self.conf
> elif isinstance(self.conf, dict):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list