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 |