##// END OF EJS Templates
gendoc: fix indentation
Christian Ebert -
r6488:119dff2c default
parent child Browse files
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 f = c.split("|")[0]
63 f = f.lstrip("^")
64 h[f] = c
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 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']))
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