--- a/mercurial/hgweb/webcommands.py Wed Jul 30 22:26:41 2008 +0200
+++ b/mercurial/hgweb/webcommands.py Fri Aug 01 12:33:10 2008 +0200
@@ -53,16 +53,15 @@
def file(web, req, tmpl):
path = web.cleanpath(req.form.get('file', [''])[0])
- if path:
+ if not path:
+ return web.manifest(tmpl, web.changectx(req), path)
+ try:
+ return web.filerevision(tmpl, web.filectx(req))
+ except revlog.LookupError, inst:
try:
- return web.filerevision(tmpl, web.filectx(req))
- except revlog.LookupError, inst:
- pass
-
- try:
- return web.manifest(tmpl, web.changectx(req), path)
- except ErrorResponse:
- raise inst
+ return web.manifest(tmpl, web.changectx(req), path)
+ except ErrorResponse:
+ raise inst
def changelog(web, req, tmpl, shortlog = False):
if 'node' in req.form: