# HG changeset patch # User Gregory Szorc # Date 1423289999 28800 # Node ID bb8b6d44fe1da70d258ac2a7773749213c3c5c64 # Parent 1f48b157dccf86e34155d2050b92cf86efd2c00d webcommands: document "archive" web command diff -r 1f48b157dccf -r bb8b6d44fe1d mercurial/hgweb/webcommands.py --- 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]