# HG changeset patch # User Alexis S. L. Carvalho # Date 1190671211 10800 # Node ID b0bfe087ad8a0121c967f1d440a810edfd4e6cdb # Parent 8ee5b8129e7be1457f3a7f98625ea4cb952aa04b 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. 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 @@ -139,8 +139,9 @@ class hgwebdir(object): u = ui.ui(parentui=parentui) try: u.readconfig(os.path.join(path, '.hg', 'hgrc')) - except IOError: - pass + except Exception, e: + u.warn(_('error reading %s/.hg/hgrc: %s\n' % (path, e))) + continue def get(section, name, default=None): return u.config(section, name, default, untrusted=True)