--- a/doc/gendoc.py Wed Oct 20 12:29:55 2010 -0200
+++ b/doc/gendoc.py Wed Oct 20 18:07:50 2010 +0200
@@ -58,19 +58,21 @@
return d
+def section(ui, s):
+ ui.write("%s\n%s\n\n" % (s, "-" * encoding.colwidth(s)))
+
+def subsection(ui, s):
+ ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s)))
+
+
def show_doc(ui):
- def section(s):
- ui.write("%s\n%s\n\n" % (s, "-" * encoding.colwidth(s)))
- def subsection(s):
- ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s)))
-
# print options
- section(_("Options"))
+ section(ui, _("Options"))
for optstr, desc in get_opts(globalopts):
ui.write("%s\n %s\n\n" % (optstr, desc))
# print cmds
- section(_("Commands"))
+ section(ui, _("Commands"))
commandprinter(ui, table)
# print topics
@@ -78,7 +80,7 @@
for name in names:
ui.write(".. _%s:\n" % name)
ui.write("\n")
- section(sec)
+ section(ui, sec)
if hasattr(doc, '__call__'):
doc = doc()
ui.write(doc)
--- a/doc/hg.1.txt Wed Oct 20 12:29:55 2010 -0200
+++ b/doc/hg.1.txt Wed Oct 20 18:07:50 2010 +0200
@@ -14,6 +14,7 @@
.. contents::
:backlinks: top
:class: htmlonly
+ :depth: 1
Synopsis