Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 39529:ec0a2601bc76
tracing: trace command function execution
Differential Revision: https://phab.mercurial-scm.org/D4514
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 06 Sep 2018 16:59:25 -0400 |
parents | 4019b4542e61 |
children | 24e493ec2229 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Fri Sep 07 16:51:51 2018 -0400 +++ b/mercurial/dispatch.py Thu Sep 06 16:59:25 2018 -0400 @@ -992,7 +992,8 @@ def _runcommand(ui, options, cmd, cmdfunc): """Run a command function, possibly with profiling enabled.""" try: - return cmdfunc() + with tracing.log("Running %s command" % cmd): + return cmdfunc() except error.SignatureError: raise error.CommandError(cmd, _('invalid arguments'))