diff mercurial/hgweb/hgwebdir_mod.py @ 13667:8cbb59124e67

hgweb: support multiple directories for the same path [paths] /dir = /path/1/*, /path/2/*
author timeless <timeless@gmail.com>
date Wed, 16 Mar 2011 03:06:57 +0100
parents d24e97fd52a9
children 6337149fc07c
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py	Wed Mar 16 03:28:56 2011 +0100
+++ b/mercurial/hgweb/hgwebdir_mod.py	Wed Mar 16 03:06:57 2011 +0100
@@ -77,7 +77,10 @@
             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):