Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 2166:d0c02b4dce9a
do not check sys.argv from localrepo when running hooks.
instead add traceback field to ui class.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Sun, 30 Apr 2006 16:30:39 -0700 |
parents | 858df1f354c1 |
children | f5c2c6e69fd7 |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Apr 30 19:30:59 2006 +0200 +++ b/mercurial/commands.py Sun Apr 30 16:30:39 2006 -0700 @@ -3365,7 +3365,7 @@ if num: signal.signal(num, catchterm) try: - u = ui.ui() + u = ui.ui(traceback='--traceback' in sys.argv[1:]) except util.Abort, inst: sys.stderr.write(_("abort: %s\n") % inst) return -1 @@ -3389,7 +3389,7 @@ external.append(mod) except Exception, inst: u.warn(_("*** failed to import extension %s: %s\n") % (x[0], inst)) - if "--traceback" in sys.argv[1:]: + if u.traceback: traceback.print_exc() return 1 continue @@ -3417,7 +3417,7 @@ atexit.register(print_time) u.updateopts(options["verbose"], options["debug"], options["quiet"], - not options["noninteractive"]) + not options["noninteractive"], options["traceback"]) # enter the debugger before command execution if options['debugger']: @@ -3484,7 +3484,7 @@ # enter the debugger when we hit an exception if options['debugger']: pdb.post_mortem(sys.exc_info()[2]) - if options['traceback']: + if u.traceback: traceback.print_exc() raise except ParseError, inst: