gendoc: fix indentation
authorChristian Ebert <blacktrash@gmx.net>
Sun, 06 Apr 2008 13:13:31 +0200
changeset 6488 119dff2cd592
parent 6487 9e3bddb5fae2
child 6489 204a2ca249b6
gendoc: fix indentation
doc/gendoc.py
--- a/doc/gendoc.py	Sun Apr 06 13:13:31 2008 +0200
+++ b/doc/gendoc.py	Sun Apr 06 13:13:31 2008 +0200
@@ -59,36 +59,36 @@
     underlined(_("COMMANDS"))
     h = {}
     for c, attr in table.items():
-            f = c.split("|")[0]
-            f = f.lstrip("^")
-            h[f] = c
+        f = c.split("|")[0]
+        f = f.lstrip("^")
+        h[f] = c
     cmds = h.keys()
     cmds.sort()
 
     for f in cmds:
-            if f.startswith("debug"): continue
-            d = get_cmd(h[f])
-            # synopsis
-            ui.write("%s::\n" % d['synopsis'].replace("hg ","", 1))
-            # description
-            ui.write("%s\n\n" % d['desc'][1])
-            # options
-            opt_output = list(d['opts'])
-            if opt_output:
-                opts_len = max([len(line[0]) for line in opt_output])
-                ui.write(_("    options:\n"))
-                for optstr, desc in opt_output:
-                    if desc:
-                        s = "%-*s  %s" % (opts_len, optstr, desc)
-                    else:
-                        s = optstr
-                    s = textwrap.fill(s, initial_indent=4 * " ",
-                                      subsequent_indent=(6 + opts_len) * " ")
-                    ui.write("%s\n" % s)
-                ui.write("\n")
-            # aliases
-            if d['aliases']:
-                ui.write(_("    aliases: %s\n\n") % " ".join(d['aliases']))
+        if f.startswith("debug"): continue
+        d = get_cmd(h[f])
+        # synopsis
+        ui.write("%s::\n" % d['synopsis'].replace("hg ","", 1))
+        # description
+        ui.write("%s\n\n" % d['desc'][1])
+        # options
+        opt_output = list(d['opts'])
+        if opt_output:
+            opts_len = max([len(line[0]) for line in opt_output])
+            ui.write(_("    options:\n"))
+            for optstr, desc in opt_output:
+                if desc:
+                    s = "%-*s  %s" % (opts_len, optstr, desc)
+                else:
+                    s = optstr
+                s = textwrap.fill(s, initial_indent=4 * " ",
+                                  subsequent_indent=(6 + opts_len) * " ")
+                ui.write("%s\n" % s)
+            ui.write("\n")
+        # aliases
+        if d['aliases']:
+            ui.write(_("    aliases: %s\n\n") % " ".join(d['aliases']))
 
     # print topics
     for t in helptable: