comparison mercurial/hgweb/hgwebdir_mod.py @ 8359:07ddec2ea203

hgweb: trust config file passed into hgwebdir Before this patch, hgwebdir suddenly showed up empty for a webdir-conf file that was for some reason not trusted. This was previously not a problem because the trust mechanism wasn't required for the very separate webdir-conf.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Tue, 12 May 2009 10:57:55 +0200
parents b579823cc546
children acc202b71619
comparison
equal deleted inserted replaced
8358:be2277c1dfcc 8359:07ddec2ea203
33 if isinstance(conf, (list, tuple)): 33 if isinstance(conf, (list, tuple)):
34 self.repos = cleannames(conf) 34 self.repos = cleannames(conf)
35 elif isinstance(conf, dict): 35 elif isinstance(conf, dict):
36 self.repos = sorted(cleannames(conf.items())) 36 self.repos = sorted(cleannames(conf.items()))
37 else: 37 else:
38 self.ui.readconfig(conf, remap={'paths': 'hgweb-paths'}) 38 self.ui.readconfig(conf, remap={'paths': 'hgweb-paths'}, trust=True)
39 self.repos = [] 39 self.repos = []
40 40
41 self.motd = self.ui.config('web', 'motd') 41 self.motd = self.ui.config('web', 'motd')
42 self.style = self.ui.config('web', 'style', 'paper') 42 self.style = self.ui.config('web', 'style', 'paper')
43 self.stripecount = self.ui.config('web', 'stripes', 1) 43 self.stripecount = self.ui.config('web', 'stripes', 1)