comparison mercurial/commands.py @ 3346:e4aa22eaa0e4

call ui.updateopts only after changing directories This corrects --config paths.foo=bar when it's used with --cwd
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 10 Oct 2006 18:43:20 -0300
parents 1700a103458e
children 5e6c19919741
comparison
equal deleted inserted replaced
3345:bce7c1b4c1c8 3346:e4aa22eaa0e4
3316 t = get_times() 3316 t = get_times()
3317 u.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") % 3317 u.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") %
3318 (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3])) 3318 (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3]))
3319 atexit.register(print_time) 3319 atexit.register(print_time)
3320 3320
3321 u.updateopts(options["verbose"], options["debug"], options["quiet"],
3322 not options["noninteractive"], options["traceback"],
3323 parseconfig(options["config"]))
3324
3325 # enter the debugger before command execution 3321 # enter the debugger before command execution
3326 if options['debugger']: 3322 if options['debugger']:
3327 pdb.set_trace() 3323 pdb.set_trace()
3328 3324
3329 try: 3325 try:
3331 try: 3327 try:
3332 os.chdir(options['cwd']) 3328 os.chdir(options['cwd'])
3333 except OSError, inst: 3329 except OSError, inst:
3334 raise util.Abort('%s: %s' % 3330 raise util.Abort('%s: %s' %
3335 (options['cwd'], inst.strerror)) 3331 (options['cwd'], inst.strerror))
3332
3333 u.updateopts(options["verbose"], options["debug"], options["quiet"],
3334 not options["noninteractive"], options["traceback"],
3335 parseconfig(options["config"]))
3336 3336
3337 path = u.expandpath(options["repository"]) or "" 3337 path = u.expandpath(options["repository"]) or ""
3338 repo = path and hg.repository(u, path=path) or None 3338 repo = path and hg.repository(u, path=path) or None
3339 if repo and not repo.local(): 3339 if repo and not repo.local():
3340 raise util.Abort(_("repository '%s' is not local") % path) 3340 raise util.Abort(_("repository '%s' is not local") % path)