##// END OF EJS Templates
gendoc: add showtopic...
Takumi IINO -
r19424:762e51ce default
parent child Browse files
Show More
@@ -7,7 +7,7 b' from mercurial import demandimport; dema'
7 from mercurial import minirst
7 from mercurial import minirst
8 from mercurial.commands import table, globalopts
8 from mercurial.commands import table, globalopts
9 from mercurial.i18n import gettext, _
9 from mercurial.i18n import gettext, _
10 from mercurial.help import helptable
10 from mercurial.help import helptable, loaddoc
11 from mercurial import extensions
11 from mercurial import extensions
12 from mercurial import util
12 from mercurial import util
13
13
@@ -96,6 +96,17 b' def showdoc(ui):'
96 ui.write(minirst.subsubsection(_('Commands')))
96 ui.write(minirst.subsubsection(_('Commands')))
97 commandprinter(ui, cmdtable, minirst.subsubsubsection)
97 commandprinter(ui, cmdtable, minirst.subsubsubsection)
98
98
99 def showtopic(ui, topic):
100 extrahelptable = [
101 (["common"], '', loaddoc('common')),
102 (["hg.1"], '', loaddoc('hg.1')),
103 (["hgignore.5"], '', loaddoc('hgignore.5')),
104 (["hgrc.5"], '', loaddoc('hgrc.5')),
105 (["hgignore.5.gendoc"], '', loaddoc('hgignore')),
106 (["hgrc.5.gendoc"], '', loaddoc('config')),
107 ]
108 helpprinter(ui, helptable + extrahelptable, None, include=[topic])
109
99 def helpprinter(ui, helptable, sectionfunc, include=[], exclude=[]):
110 def helpprinter(ui, helptable, sectionfunc, include=[], exclude=[]):
100 for names, sec, doc in helptable:
111 for names, sec, doc in helptable:
101 if exclude and names[0] in exclude:
112 if exclude and names[0] in exclude:
General Comments 0
You need to be logged in to leave comments. Login now