--- 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):