Mercurial > hg
changeset 24088:fe3ee31b039f
webcommands: document "file" web command
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 06 Feb 2015 21:26:53 -0800 |
parents | 6f5b4393590c |
children | f17773432782 |
files | mercurial/hgweb/webcommands.py |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Fri Feb 06 21:13:03 2015 -0800 +++ b/mercurial/hgweb/webcommands.py Fri Feb 06 21:26:53 2015 -0800 @@ -131,6 +131,24 @@ @webcommand('file') def file(web, req, tmpl): + """ + /file/{revision}[/{path}] + ------------------------- + + Show information about a directory or file in the repository. + + Info about the ``path`` given as a URL parameter will be rendered. + + If ``path`` is a directory, information about the entries in that + directory will be rendered. This form is equivalent to the ``manifest`` + handler. + + If ``path`` is a file, information about that file will be shown via + the ``filerevision`` template. + + If ``path`` is not defined, information about the root directory will + be rendered. + """ path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0]) if not path: return manifest(web, req, tmpl)