comparison mercurial/hgweb/webcommands.py @ 24081:ff42de48193c

webcommands: document "help" web command
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 06 Feb 2015 20:41:08 -0800
parents e44586d9c207
children 32dabf811b39
comparison
equal deleted inserted replaced
24080:a3f2ea1d4943 24081:ff42de48193c
1079 doc = _('(no help text available)') 1079 doc = _('(no help text available)')
1080 return doc 1080 return doc
1081 1081
1082 @webcommand('help') 1082 @webcommand('help')
1083 def help(web, req, tmpl): 1083 def help(web, req, tmpl):
1084 """
1085 /help[/{topic}]
1086 ---------------
1087
1088 Render help documentation.
1089
1090 This web command is roughly equivalent to :hg:`help`. If a ``topic``
1091 is defined, that help topic will be rendered. If not, an index of
1092 available help topics will be rendered.
1093
1094 The ``help`` template will be rendered when requesting help for a topic.
1095 ``helptopics`` will be rendered for the index of help topics.
1096 """
1084 from mercurial import commands # avoid cycle 1097 from mercurial import commands # avoid cycle
1085 from mercurial import help as helpmod # avoid cycle 1098 from mercurial import help as helpmod # avoid cycle
1086 1099
1087 topicname = req.form.get('node', [None])[0] 1100 topicname = req.form.get('node', [None])[0]
1088 if not topicname: 1101 if not topicname: