Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 36878:89002d07a114
hgweb: remove one-off routing for file?style=raw
Now that both functions are using the same API, we can unify how
the command is called and perform command-specific behavior in the
command itself instead of in the high-level router.
Differential Revision: https://phab.mercurial-scm.org/D2788
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 10 Mar 2018 15:37:29 -0800 |
parents | 9fc3d814646e |
children | 98baf8dea553 |
comparison
equal
deleted
inserted
replaced
36877:9fc3d814646e | 36878:89002d07a114 |
---|---|
184 the ``filerevision`` template. | 184 the ``filerevision`` template. |
185 | 185 |
186 If ``path`` is not defined, information about the root directory will | 186 If ``path`` is not defined, information about the root directory will |
187 be rendered. | 187 be rendered. |
188 """ | 188 """ |
189 if web.req.qsparams.get('style') == 'raw': | |
190 return rawfile(web, req, tmpl) | |
191 | |
189 path = webutil.cleanpath(web.repo, req.req.qsparams.get('file', '')) | 192 path = webutil.cleanpath(web.repo, req.req.qsparams.get('file', '')) |
190 if not path: | 193 if not path: |
191 return manifest(web, req, tmpl) | 194 return manifest(web, req, tmpl) |
192 try: | 195 try: |
193 return _filerevision(web, req, tmpl, webutil.filectx(web.repo, req)) | 196 return _filerevision(web, req, tmpl, webutil.filectx(web.repo, req)) |