Mercurial > hg
changeset 24096:bb8b6d44fe1d
webcommands: document "archive" web command
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 06 Feb 2015 22:19:59 -0800 |
parents | 1f48b157dccf |
children | 8e04a73b5502 |
files | mercurial/hgweb/webcommands.py |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Fri Feb 06 22:11:54 2015 -0800 +++ b/mercurial/hgweb/webcommands.py Fri Feb 06 22:19:59 2015 -0800 @@ -1076,6 +1076,25 @@ @webcommand('archive') def archive(web, req, tmpl): + """ + /archive/{revision}.{format}[/{path}] + ------------------------------------- + + Obtain an archive of repository content. + + The content and type of the archive is defined by a URL path parameter. + ``format`` is the file extension of the archive type to be generated. e.g. + ``zip`` or ``tar.bz2``. Not all archive types may be allowed by your + server configuration. + + The optional ``path`` URL parameter controls content to include in the + archive. If omitted, every file in the specified revision is present in the + archive. If included, only the specified file or contents of the specified + directory will be included in the archive. + + No template is used for this handler. Raw, binary content is generated. + """ + type_ = req.form.get('type', [None])[0] allowed = web.configlist("web", "allow_archive") key = req.form['node'][0]