tracing: trace command function execution
Differential Revision: https://phab.mercurial-scm.org/D4514
--- 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'))