[PATCH 15 of 22 hgweb-help] webcommands: document "manifest" web command

Gregory Szorc gregory.szorc at gmail.com
Sat Feb 7 01:15:53 CST 2015


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1423288081 28800
#      Fri Feb 06 21:48:01 2015 -0800
# Node ID 88f6e14c90ff0e9b358baf40bd43de8d4da81374
# Parent  8d0a3d23b55a681c80501e6a868e6a14c54d573d
webcommands: document "manifest" web command

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -496,8 +496,23 @@ def decodepath(path):
     return path
 
 @webcommand('manifest')
 def manifest(web, req, tmpl):
+    """
+    /manifest[/{revision}[/{path}]]
+    -------------------------------
+
+    Show information about a directory.
+
+    If the URL path arguments are defined, information about the root
+    directory for the ``tip`` changeset will be shown.
+
+    Because this handler can only show information for directories, it
+    is recommended to use the ``file`` handler instead, as it can handle both
+    directories and files.
+
+    The ``manifest`` template will be rendered for this handler.
+    """
     ctx = webutil.changectx(web.repo, req)
     path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
     mf = ctx.manifest()
     node = ctx.node()


More information about the Mercurial-devel mailing list