diff mercurial/hgweb/webcommands.py @ 6857:e8c2dae47799

Merge with crew-stable
author Patrick Mezard <pmezard@gmail.com>
date Sat, 02 Aug 2008 14:08:21 +0200
parents f67d1468ac50 2ff0829bdae5
children 029a54423a96
line wrap: on
line diff
--- 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):