# HG changeset patch # User timeless@gmail.com # Date 2011-03-29 16:33:10 # Node ID 6337149fc07c61e7794f7d441c61427c1537721b # Parent 43b5fe18ea6ca811fe26e1a371abf666f672821b hgwebdir: handle IOErrors from localrepo while enumerating Repository() raises a number of IOErrors in addition to RepoErrors. these are just as uninteresting as RepoErrors and should be ignored The easiest case of this is a repo whose .hg/ directory is -rx 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 @@ -251,6 +251,9 @@ class hgwebdir(object): # update time with local timezone try: r = hg.repository(self.ui, path) + except IOError: + u.warn(_('error accessing repository at %s\n') % path) + continue except error.RepoError: u.warn(_('error accessing repository at %s\n') % path) continue