Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
2292:903ab41ac7eb | 2293:3dc6f2501dbc |
---|---|
3134 ('', 'cwd', '', _('change working directory')), | 3134 ('', 'cwd', '', _('change working directory')), |
3135 ('y', 'noninteractive', None, | 3135 ('y', 'noninteractive', None, |
3136 _('do not prompt, assume \'yes\' for any required answers')), | 3136 _('do not prompt, assume \'yes\' for any required answers')), |
3137 ('q', 'quiet', None, _('suppress output')), | 3137 ('q', 'quiet', None, _('suppress output')), |
3138 ('v', 'verbose', None, _('enable additional output')), | 3138 ('v', 'verbose', None, _('enable additional output')), |
3139 ('', 'config', [], _('set/override config option')), | |
3139 ('', 'debug', None, _('enable debugging output')), | 3140 ('', 'debug', None, _('enable debugging output')), |
3140 ('', 'debugger', None, _('start debugger')), | 3141 ('', 'debugger', None, _('start debugger')), |
3141 ('', 'traceback', None, _('print traceback on exception')), | 3142 ('', 'traceback', None, _('print traceback on exception')), |
3142 ('', 'time', None, _('time how long the command takes')), | 3143 ('', 'time', None, _('time how long the command takes')), |
3143 ('', 'profile', None, _('print command execution profile')), | 3144 ('', 'profile', None, _('print command execution profile')), |
3298 u.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") % | 3299 u.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") % |
3299 (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3])) | 3300 (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3])) |
3300 atexit.register(print_time) | 3301 atexit.register(print_time) |
3301 | 3302 |
3302 u.updateopts(options["verbose"], options["debug"], options["quiet"], | 3303 u.updateopts(options["verbose"], options["debug"], options["quiet"], |
3303 not options["noninteractive"], options["traceback"]) | 3304 not options["noninteractive"], options["traceback"], |
3305 options["config"]) | |
3304 | 3306 |
3305 # enter the debugger before command execution | 3307 # enter the debugger before command execution |
3306 if options['debugger']: | 3308 if options['debugger']: |
3307 pdb.set_trace() | 3309 pdb.set_trace() |
3308 | 3310 |