Show More
@@ -21,6 +21,8 import traceback | |||
|
21 | 21 | |
|
22 | 22 | from .i18n import _ |
|
23 | 23 | |
|
24 | from hgdemandimport import tracing | |
|
25 | ||
|
24 | 26 | from . import ( |
|
25 | 27 | cmdutil, |
|
26 | 28 | color, |
@@ -84,6 +86,7 class request(object): | |||
|
84 | 86 | def run(): |
|
85 | 87 | "run the command in sys.argv" |
|
86 | 88 | initstdio() |
|
89 | with tracing.log('parse args into request'): | |
|
87 | 90 | req = request(pycompat.sysargv[1:]) |
|
88 | 91 | err = None |
|
89 | 92 | try: |
@@ -176,6 +179,7 def _formatargs(args): | |||
|
176 | 179 | |
|
177 | 180 | def dispatch(req): |
|
178 | 181 | """run the command specified in req.args; returns an integer status code""" |
|
182 | with tracing.log('dispatch.dispatch'): | |
|
179 | 183 | if req.ferr: |
|
180 | 184 | ferr = req.ferr |
|
181 | 185 | elif req.ui: |
@@ -247,6 +251,7 def dispatch(req): | |||
|
247 | 251 | return ret |
|
248 | 252 | |
|
249 | 253 | def _runcatch(req): |
|
254 | with tracing.log('dispatch._runcatch'): | |
|
250 | 255 | def catchterm(*args): |
|
251 | 256 | raise error.SignalInterrupt |
|
252 | 257 | |
@@ -262,7 +267,8 def _runcatch(req): | |||
|
262 | 267 | def _runcatchfunc(): |
|
263 | 268 | realcmd = None |
|
264 | 269 | try: |
|
265 |
cmdargs = fancyopts.fancyopts( |
|
|
270 | cmdargs = fancyopts.fancyopts( | |
|
271 | req.args[:], commands.globalopts, {}) | |
|
266 | 272 | cmd = cmdargs[0] |
|
267 | 273 | aliases, entry = cmdutil.findcmd(cmd, commands.table, False) |
|
268 | 274 | realcmd = aliases[0] |
@@ -350,7 +356,6 def _runcatch(req): | |||
|
350 | 356 | traceback.print_exc() |
|
351 | 357 | debugmortem[debugger](sys.exc_info()[2]) |
|
352 | 358 | raise |
|
353 | ||
|
354 | 359 | return _callcatch(ui, _runcatchfunc) |
|
355 | 360 | |
|
356 | 361 | def _callcatch(ui, func): |
General Comments 0
You need to be logged in to leave comments.
Login now