diff mercurial/commands.py @ 2293:3dc6f2501dbc

add --config global option. allows to set hgrc option on command line. syntax: --config section.name=value also add new test-globalopts to test all global options in one place.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Mon, 15 May 2006 11:16:32 -0700
parents 3f18d1eea370
children dacf718e1d48
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3136,6 +3136,7 @@ globalopts = [
      _('do not prompt, assume \'yes\' for any required answers')),
     ('q', 'quiet', None, _('suppress output')),
     ('v', 'verbose', None, _('enable additional output')),
+    ('', 'config', [], _('set/override config option')),
     ('', 'debug', None, _('enable debugging output')),
     ('', 'debugger', None, _('start debugger')),
     ('', 'traceback', None, _('print traceback on exception')),
@@ -3300,7 +3301,8 @@ def dispatch(args):
             atexit.register(print_time)
 
         u.updateopts(options["verbose"], options["debug"], options["quiet"],
-                     not options["noninteractive"], options["traceback"])
+                     not options["noninteractive"], options["traceback"],
+                     options["config"])
 
         # enter the debugger before command execution
         if options['debugger']: