# HG changeset patch # User Boris Feld # Date 2018-09-06 20:59:25 # Node ID ec0a2601bc760799888db003072ed333404567aa # Parent 1ab185c78cc382127f731bd93548a6d80979e6b4 tracing: trace command function execution Differential Revision: https://phab.mercurial-scm.org/D4514 diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -992,7 +992,8 @@ def _dispatch(req): 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'))