comparison mercurial/hgweb/hgwebdir_mod.py @ 5332:b0bfe087ad8a

hgwebdir: ignore hgrc parse errors while building the index page An error in the .hg/hgrc file from a repository would prevent the following repos from being shown in the index page. The IOError handling was unnecessary - it's already handled in readconfig. This should fix issue731. The error in the .hg/hgrc file will still prevent the repo from being exported with hgweb.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Mon, 24 Sep 2007 19:00:11 -0300
parents ed6df6b1c29a
children 24de027551c1
comparison
equal deleted inserted replaced
5331:8ee5b8129e7b 5332:b0bfe087ad8a
137 parity = paritygen(self.stripecount) 137 parity = paritygen(self.stripecount)
138 for name, path in self.repos: 138 for name, path in self.repos:
139 u = ui.ui(parentui=parentui) 139 u = ui.ui(parentui=parentui)
140 try: 140 try:
141 u.readconfig(os.path.join(path, '.hg', 'hgrc')) 141 u.readconfig(os.path.join(path, '.hg', 'hgrc'))
142 except IOError: 142 except Exception, e:
143 pass 143 u.warn(_('error reading %s/.hg/hgrc: %s\n' % (path, e)))
144 continue
144 def get(section, name, default=None): 145 def get(section, name, default=None):
145 return u.config(section, name, default, untrusted=True) 146 return u.config(section, name, default, untrusted=True)
146 147
147 if u.configbool("web", "hidden", untrusted=True): 148 if u.configbool("web", "hidden", untrusted=True):
148 continue 149 continue