Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/help.py @ 27377:d1c998d7b103
help: pass subtopic into help()
Now that we have multiple directories where help topics can live,
we need a mechanism to access them. We already use "." to
separate topic from section. So it seems logical to also use "." to
denote the sub-directory of a topic.
This patch teaches the help command to parse out the possible
sub-topic and pass it to the help system.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 13 Dec 2015 11:04:45 -0800 |
parents | fc810d950278 |
children | c709b515218e |
comparison
equal
deleted
inserted
replaced
27376:fc810d950278 | 27377:d1c998d7b103 |
---|---|
253 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) | 253 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) |
254 addtopicsymbols('templates', '.. functionsmarker', templater.funcs) | 254 addtopicsymbols('templates', '.. functionsmarker', templater.funcs) |
255 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands, | 255 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands, |
256 dedent=True) | 256 dedent=True) |
257 | 257 |
258 def help_(ui, name, unknowncmd=False, full=True, **opts): | 258 def help_(ui, name, unknowncmd=False, full=True, subtopic=None, **opts): |
259 ''' | 259 ''' |
260 Generate the help for 'name' as unformatted restructured text. If | 260 Generate the help for 'name' as unformatted restructured text. If |
261 'name' is None, describe the commands available. | 261 'name' is None, describe the commands available. |
262 ''' | 262 ''' |
263 | 263 |