Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/hgwebdir_mod.py @ 12038:9617803b1acb stable
hgweb: handle exception of misconfigured path on index page
If hgweb.config contains wrong path mapping, hgweb causes internal server
error on repository index page.
This patch changes makeindex() to ignore RepoError, because it looks to be
designed to suppress configuration error.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 24 Aug 2010 23:30:51 +0900 |
parents | 8f8a7976f4bc |
children | 94e7bd38d9a3 |
comparison
equal
deleted
inserted
replaced
12030:927d63be166b | 12038:9617803b1acb |
---|---|
231 url = re.sub(r'/+', '/', '/'.join(parts) + '/') | 231 url = re.sub(r'/+', '/', '/'.join(parts) + '/') |
232 | 232 |
233 # update time with local timezone | 233 # update time with local timezone |
234 try: | 234 try: |
235 r = hg.repository(self.ui, path) | 235 r = hg.repository(self.ui, path) |
236 except error.RepoError: | |
237 u.warn(_('error accessing repository at %s\n') % path) | |
238 continue | |
239 try: | |
236 d = (get_mtime(r.spath), util.makedate()[1]) | 240 d = (get_mtime(r.spath), util.makedate()[1]) |
237 except OSError: | 241 except OSError: |
238 continue | 242 continue |
239 | 243 |
240 contact = get_contact(get) | 244 contact = get_contact(get) |