Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
6852:8dc510c4caee | 6857:e8c2dae47799 |
---|---|
89 rename=webutil.renamelink(fctx), | 89 rename=webutil.renamelink(fctx), |
90 permissions=fctx.manifest().flags(f)) | 90 permissions=fctx.manifest().flags(f)) |
91 | 91 |
92 def file(web, req, tmpl): | 92 def file(web, req, tmpl): |
93 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0]) | 93 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0]) |
94 if path: | 94 if not path: |
95 return manifest(web, req, tmpl) | |
96 try: | |
97 return _filerevision(web, tmpl, webutil.filectx(web.repo, req)) | |
98 except revlog.LookupError, inst: | |
95 try: | 99 try: |
96 return _filerevision(web, tmpl, webutil.filectx(web.repo, req)) | 100 return manifest(web, req, tmpl) |
97 except revlog.LookupError, inst: | 101 except ErrorResponse: |
98 pass | 102 raise inst |
99 | |
100 try: | |
101 return manifest(web, req, tmpl) | |
102 except ErrorResponse: | |
103 raise inst | |
104 | 103 |
105 def _search(web, tmpl, query): | 104 def _search(web, tmpl, query): |
106 | 105 |
107 def changelist(**map): | 106 def changelist(**map): |
108 cl = web.repo.changelog | 107 cl = web.repo.changelog |