##// END OF EJS Templates
gendoc: documentation section describing available extensions
Cédric Duval -
r9310:5724cd7b default
parent child Browse files
Show More
@@ -7,6 +7,7 b' from mercurial import demandimport; dema'
7 from mercurial.commands import table, globalopts
7 from mercurial.commands import table, globalopts
8 from mercurial.i18n import _
8 from mercurial.i18n import _
9 from mercurial.help import helptable
9 from mercurial.help import helptable
10 from mercurial import extensions
10
11
11 def get_desc(docstr):
12 def get_desc(docstr):
12 if not docstr:
13 if not docstr:
@@ -111,5 +112,15 b' def show_doc(ui):'
111 ui.write(doc)
112 ui.write(doc)
112 ui.write("\n")
113 ui.write("\n")
113
114
115 # print extensions
116 underlined(_("EXTENSIONS"))
117 ui.write('\n')
118 for name in sorted(extensions.listexts('../hgext')):
119 ui.write('.. _%s:\n\n' % name)
120 doc = extensions.doc(name).splitlines()
121 synopsis, rest = doc[0], doc[1:]
122 ui.write("``%s: %s``" % (name, synopsis))
123 ui.write('%s\n\n' % '\n '.join(rest))
124
114 if __name__ == "__main__":
125 if __name__ == "__main__":
115 show_doc(sys.stdout)
126 show_doc(sys.stdout)
General Comments 0
You need to be logged in to leave comments. Login now