Show More
@@ -58,19 +58,21 b' def get_cmd(cmd, cmdtable):' | |||||
58 |
|
58 | |||
59 | return d |
|
59 | return d | |
60 |
|
60 | |||
|
61 | def section(ui, s): | |||
|
62 | ui.write("%s\n%s\n\n" % (s, "-" * encoding.colwidth(s))) | |||
|
63 | ||||
|
64 | def subsection(ui, s): | |||
|
65 | ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s))) | |||
|
66 | ||||
|
67 | ||||
61 | def show_doc(ui): |
|
68 | def show_doc(ui): | |
62 | def section(s): |
|
|||
63 | ui.write("%s\n%s\n\n" % (s, "-" * encoding.colwidth(s))) |
|
|||
64 | def subsection(s): |
|
|||
65 | ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s))) |
|
|||
66 |
|
||||
67 | # print options |
|
69 | # print options | |
68 | section(_("Options")) |
|
70 | section(ui, _("Options")) | |
69 | for optstr, desc in get_opts(globalopts): |
|
71 | for optstr, desc in get_opts(globalopts): | |
70 | ui.write("%s\n %s\n\n" % (optstr, desc)) |
|
72 | ui.write("%s\n %s\n\n" % (optstr, desc)) | |
71 |
|
73 | |||
72 | # print cmds |
|
74 | # print cmds | |
73 | section(_("Commands")) |
|
75 | section(ui, _("Commands")) | |
74 | commandprinter(ui, table) |
|
76 | commandprinter(ui, table) | |
75 |
|
77 | |||
76 | # print topics |
|
78 | # print topics | |
@@ -78,7 +80,7 b' def show_doc(ui):' | |||||
78 | for name in names: |
|
80 | for name in names: | |
79 | ui.write(".. _%s:\n" % name) |
|
81 | ui.write(".. _%s:\n" % name) | |
80 | ui.write("\n") |
|
82 | ui.write("\n") | |
81 | section(sec) |
|
83 | section(ui, sec) | |
82 | if hasattr(doc, '__call__'): |
|
84 | if hasattr(doc, '__call__'): | |
83 | doc = doc() |
|
85 | doc = doc() | |
84 | ui.write(doc) |
|
86 | ui.write(doc) |
General Comments 0
You need to be logged in to leave comments.
Login now