commands: support verbose help
authorMartin Geisler <mg@lazybytes.net>
Sat, 13 Feb 2010 18:36:24 +0100
changeset 10445 8b45102934e2
parent 10444 e99e0e077bc4
child 10446 a565a2445eb5
commands: support verbose help
mercurial/commands.py
--- a/mercurial/commands.py	Sat Feb 13 18:11:08 2010 +0100
+++ b/mercurial/commands.py	Sat Feb 13 18:36:24 2010 +0100
@@ -1527,7 +1527,11 @@
             doc = _("(no help text available)")
         if ui.quiet:
             doc = doc.splitlines()[0]
-        ui.write("\n%s\n" % minirst.format(doc, textwidth))
+        keep = ui.verbose and ['verbose'] or []
+        formatted, pruned = minirst.format(doc, textwidth, keep=keep)
+        ui.write("\n%s\n" % formatted)
+        if pruned:
+            ui.write(_('\nuse "hg -v help %s" to show verbose help\n') % name)
 
         if not ui.quiet:
             # options