--- a/mercurial/hgweb/webcommands.py Sun Mar 23 22:15:47 2008 +0100
+++ b/mercurial/hgweb/webcommands.py Sun Mar 23 23:08:18 2008 +0100
@@ -34,10 +34,13 @@
try:
fctx = web.filectx(req)
- except revlog.LookupError:
- content = web.manifest(tmpl, web.changectx(req), path)
- req.respond(HTTP_OK, web.ctype)
- return content
+ except revlog.LookupError, inst:
+ try:
+ content = web.manifest(tmpl, web.changectx(req), path)
+ req.respond(HTTP_OK, web.ctype)
+ return content
+ except ErrorResponse:
+ raise inst
path = fctx.path()
text = fctx.data()
@@ -53,10 +56,13 @@
if path:
try:
return web.filerevision(tmpl, web.filectx(req))
- except revlog.LookupError:
+ except revlog.LookupError, inst:
pass
- return web.manifest(tmpl, web.changectx(req), path)
+ try:
+ return web.manifest(tmpl, web.changectx(req), path)
+ except ErrorResponse:
+ raise inst
def changelog(web, req, tmpl, shortlog = False):
if 'node' in req.form:
@@ -109,7 +115,7 @@
web.configbool("web", "allow" + type_, False))):
web.archive(tmpl, req, req.form['node'][0], type_)
return []
- raise ErrorResponse(HTTP_NOT_FOUND, 'Unsupported archive type: %s' % type_)
+ raise ErrorResponse(HTTP_NOT_FOUND, 'unsupported archive type: %s' % type_)
def static(web, req, tmpl):
fname = req.form['file'][0]