[PATCH 21 of 22 hgweb-help] webcommands: document "archive" web command

Gregory Szorc gregory.szorc at gmail.com
Sat Feb 7 07:15:59 UTC 2015


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1423289999 28800
#      Fri Feb 06 22:19:59 2015 -0800
# Node ID 8aa04da3b94ef23efe0ac4fe708885de83869bd1
# Parent  930ebcac556188143428bbc0bb1811b5df640c31
webcommands: document "archive" web command

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -1078,8 +1078,27 @@ def filelog(web, req, tmpl):
                 revcount=revcount, morevars=morevars, lessvars=lessvars)
 
 @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]
 



More information about the Mercurial-devel mailing list