Show More
@@ -59,36 +59,36 b' def show_doc(ui):' | |||
|
59 | 59 | underlined(_("COMMANDS")) |
|
60 | 60 | h = {} |
|
61 | 61 | for c, attr in table.items(): |
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
62 | f = c.split("|")[0] | |
|
63 | f = f.lstrip("^") | |
|
64 | h[f] = c | |
|
65 | 65 | cmds = h.keys() |
|
66 | 66 | cmds.sort() |
|
67 | 67 | |
|
68 | 68 | for f in cmds: |
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
|
69 | if f.startswith("debug"): continue | |
|
70 | d = get_cmd(h[f]) | |
|
71 | # synopsis | |
|
72 | ui.write("%s::\n" % d['synopsis'].replace("hg ","", 1)) | |
|
73 | # description | |
|
74 | ui.write("%s\n\n" % d['desc'][1]) | |
|
75 | # options | |
|
76 | opt_output = list(d['opts']) | |
|
77 | if opt_output: | |
|
78 | opts_len = max([len(line[0]) for line in opt_output]) | |
|
79 | ui.write(_(" options:\n")) | |
|
80 | for optstr, desc in opt_output: | |
|
81 | if desc: | |
|
82 | s = "%-*s %s" % (opts_len, optstr, desc) | |
|
83 | else: | |
|
84 | s = optstr | |
|
85 | s = textwrap.fill(s, initial_indent=4 * " ", | |
|
86 | subsequent_indent=(6 + opts_len) * " ") | |
|
87 | ui.write("%s\n" % s) | |
|
88 | ui.write("\n") | |
|
89 | # aliases | |
|
90 | if d['aliases']: | |
|
91 | ui.write(_(" aliases: %s\n\n") % " ".join(d['aliases'])) | |
|
92 | 92 | |
|
93 | 93 | # print topics |
|
94 | 94 | for t in helptable: |
General Comments 0
You need to be logged in to leave comments.
Login now