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

login
register
mail settings
Submitter Gregory Szorc
Date Feb. 7, 2015, 7:15 a.m.
Message ID <88f6e14c90ff0e9b358b.1423293353@gps-mbp.local>
Download mbox | patch
Permalink /patch/7753/
State Accepted
Headers show

Comments

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

Patch

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()