diff -r b8009718a211 -r c6274913eba5 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Tue Jan 22 09:11:11 2008 +0100 +++ b/mercurial/hgweb/webcommands.py Tue Jan 22 09:28:51 2008 +0100 @@ -7,7 +7,7 @@ import os, mimetypes from mercurial import revlog, util -from common import staticfile +from common import staticfile, ErrorResponse def log(web, req, tmpl): if 'file' in req.form and req.form['file'][0]: @@ -100,8 +100,7 @@ web.archive(tmpl, req, req.form['node'][0], type_) return - req.respond(400, tmpl('error', - error='Unsupported archive type: %s' % type_)) + raise ErrorResponse(400, 'Unsupported archive type: %s' % type_) def static(web, req, tmpl): fname = req.form['file'][0]