comparison mercurial/cmdutil.py @ 4717:97369f6a6bb6

New config option: ui.report_untrusted (defaults to True)
author Thomas Arendsen Hein <thomas@intevation.de>
date Mon, 25 Jun 2007 22:41:15 +0200
parents 36d23de02da1
children 79cc512a34ed
comparison
equal deleted inserted replaced
4716:36d23de02da1 4717:97369f6a6bb6
273 273
274 def dispatch(ui, args, argv0=None): 274 def dispatch(ui, args, argv0=None):
275 # remember how to call 'hg' before changing the working dir 275 # remember how to call 'hg' before changing the working dir
276 util.set_hgexecutable(argv0) 276 util.set_hgexecutable(argv0)
277 277
278 # check for cwd first 278 # read --config before doing anything else
279 # (e.g. to change trust settings for reading .hg/hgrc)
280 config = earlygetopt(['--config'], args)
281 if config:
282 ui.updateopts(config=parseconfig(config))
283
284 # check for cwd
279 cwd = earlygetopt(['--cwd'], args) 285 cwd = earlygetopt(['--cwd'], args)
280 if cwd: 286 if cwd:
281 os.chdir(cwd[-1]) 287 os.chdir(cwd[-1])
282 288
283 # read the local repository .hgrc into a local ui object 289 # read the local repository .hgrc into a local ui object
323 ui.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") % 329 ui.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") %
324 (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3])) 330 (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3]))
325 atexit.register(print_time) 331 atexit.register(print_time)
326 332
327 ui.updateopts(options["verbose"], options["debug"], options["quiet"], 333 ui.updateopts(options["verbose"], options["debug"], options["quiet"],
328 not options["noninteractive"], options["traceback"], 334 not options["noninteractive"], options["traceback"])
329 parseconfig(options["config"]))
330 335
331 if options['help']: 336 if options['help']:
332 return commands.help_(ui, cmd, options['version']) 337 return commands.help_(ui, cmd, options['version'])
333 elif options['version']: 338 elif options['version']:
334 return commands.version_(ui) 339 return commands.version_(ui)