changeset 843:859e7ea530bd

'hg help -v' shows global options
author kreijack@inwind.REMOVEME.it
date Sat, 06 Aug 2005 13:27:31 +0100
parents 8fb488773063
children 5a717cfa7406
files mercurial/commands.py
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Aug 06 12:05:09 2005 +0100
+++ b/mercurial/commands.py	Sat Aug 06 13:27:31 2005 +0100
@@ -314,6 +314,20 @@
             show_version(ui)
             ui.write('\n')
         if ui.verbose:
+            ui.write("global options:\n\n")
+            for s, l, d, c in globalopts:
+                opt = ' '
+                if s:
+                    opt = opt + '-' + s + ' '
+                if l:
+                    opt = opt + '--' + l + ' '
+                if d:
+                    opt = opt + '(' + str(d) + ')'
+                ui.write(opt, "\n")
+                if c:
+                    ui.write('    %s\n' % c)
+            ui.write("\n")
+
             ui.write('hg commands:\n\n')
         else:
             ui.write('basic hg commands (use "hg help -v" for more):\n\n')