--- a/doc/gendoc.py Fri Nov 14 19:10:09 2008 +0100
+++ b/doc/gendoc.py Fri Nov 14 14:12:16 2008 -0600
@@ -36,14 +36,21 @@
attr = table[cmd]
cmds = cmd.lstrip("^").split("|")
- d['synopsis'] = attr[2]
d['cmd'] = cmds[0]
d['aliases'] = cmd.split("|")[1:]
d['desc'] = get_desc(attr[0].__doc__)
d['opts'] = list(get_opts(attr[1]))
+
+ s = 'hg ' + cmds[0]
+ if len(attr) > 2:
+ if not attr[2].startswith('hg'):
+ s += attr[2]
+ else:
+ s = attr[2]
+ d['synopsis'] = s
+
return d
-
def show_doc(ui):
def bold(s, text=""):
ui.write("%s\n%s\n%s\n" % (s, "="*len(s), text))