Patchwork [06,of,22,hgweb-help] webcommands: document help command

login
register
mail settings
Submitter Gregory Szorc
Date Feb. 7, 2015, 7:15 a.m.
Message ID <b6e48dd99ce1864cba1a.1423293344@gps-mbp.local>
Download mbox | patch
Permalink /patch/7744/
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 1423284068 28800
#      Fri Feb 06 20:41:08 2015 -0800
# Node ID b6e48dd99ce1864cba1ad4abaf1f8637bf6be1d4
# Parent  dc6527c38b15a67d00fd959b597149c107396b30
webcommands: document help command

Patch

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -1083,8 +1083,21 @@  def _getdoc(e):
     return doc
 
 @webcommand('help')
 def help(web, req, tmpl):
+    """
+    /help[/{topic}]
+    ---------------
+
+    Render help documentation.
+
+    This web command is roughly equivalent to :hg:`help`. If a ``topic``
+    is defined, that help topic will be rendered. If not, an index of
+    available help topics will be rendered.
+
+    The ``help`` template will be rendered when requesting help for a topic.
+    ``helptopics`` will be rendered for the index of help topics.
+    """
     from mercurial import commands # avoid cycle
     from mercurial import help as helpmod # avoid cycle
 
     topicname = req.form.get('node', [None])[0]