mercurial/hgweb/webcommands.py
changeset 6857 e8c2dae47799
parent 6762 f67d1468ac50
parent 6853 2ff0829bdae5
child 6981 029a54423a96
--- a/mercurial/hgweb/webcommands.py	Wed Jul 30 22:33:40 2008 +0200
+++ b/mercurial/hgweb/webcommands.py	Sat Aug 02 14:08:21 2008 +0200
@@ -91,16 +91,15 @@
 
 def file(web, req, tmpl):
     path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
-    if path:
+    if not path:
+        return manifest(web, req, tmpl)
+    try:
+        return _filerevision(web, tmpl, webutil.filectx(web.repo, req))
+    except revlog.LookupError, inst:
         try:
-            return _filerevision(web, tmpl, webutil.filectx(web.repo, req))
-        except revlog.LookupError, inst:
-            pass
-
-    try:
-        return manifest(web, req, tmpl)
-    except ErrorResponse:
-        raise inst
+            return manifest(web, req, tmpl)
+        except ErrorResponse:
+            raise inst
 
 def _search(web, tmpl, query):