'hg help -v' mentions the alias of the commands
authorkreijack@inwind.REMOVEME.it
Sat, 06 Aug 2005 13:27:31 +0100
changeset 844 5a717cfa7406
parent 843 859e7ea530bd
child 845 52576cf969f2
'hg help -v' mentions the alias of the commands
mercurial/commands.py
--- a/mercurial/commands.py	Sat Aug 06 13:27:31 2005 +0100
+++ b/mercurial/commands.py	Sat Aug 06 13:27:31 2005 +0100
@@ -333,6 +333,7 @@
             ui.write('basic hg commands (use "hg help -v" for more):\n\n')
 
         h = {}
+        cmds = {}
         for c, e in table.items():
             f = c.split("|")[0]
             if not ui.verbose and not f.startswith("^"):
@@ -344,12 +345,17 @@
             if e[0].__doc__:
                 d = e[0].__doc__.splitlines(0)[0].rstrip()
             h[f] = d
+            cmds[f]=c.lstrip("^")
 
         fns = h.keys()
         fns.sort()
         m = max(map(len, fns))
         for f in fns:
-            ui.write(' %-*s   %s\n' % (m, f, h[f]))
+            if ui.verbose:
+                commands = cmds[f].replace("|",", ")
+                ui.write(" %s:\n      %s\n"%(commands,h[f]))
+            else:
+                ui.write(' %-*s   %s\n' % (m, f, h[f]))
 
 # Commands start here, listed alphabetically