comparison 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
comparison
equal deleted inserted replaced
13666:c49cddce0a81 13667:8cbb59124e67
75 if not isinstance(self.conf, (dict, list, tuple)): 75 if not isinstance(self.conf, (dict, list, tuple)):
76 map = {'paths': 'hgweb-paths'} 76 map = {'paths': 'hgweb-paths'}
77 if not os.path.exists(self.conf): 77 if not os.path.exists(self.conf):
78 raise util.Abort(_('config file %s not found!') % self.conf) 78 raise util.Abort(_('config file %s not found!') % self.conf)
79 u.readconfig(self.conf, remap=map, trust=True) 79 u.readconfig(self.conf, remap=map, trust=True)
80 paths = u.configitems('hgweb-paths') 80 paths = []
81 for name, ignored in u.configitems('hgweb-paths'):
82 for path in u.configlist('hgweb-paths', name):
83 paths.append((name, path))
81 elif isinstance(self.conf, (list, tuple)): 84 elif isinstance(self.conf, (list, tuple)):
82 paths = self.conf 85 paths = self.conf
83 elif isinstance(self.conf, dict): 86 elif isinstance(self.conf, dict):
84 paths = self.conf.items() 87 paths = self.conf.items()
85 88