Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 39512: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 |
comparison
equal
deleted
inserted
replaced
39511:1ab185c78cc3 | 39512:ec0a2601bc76 |
---|---|
990 repo.close() | 990 repo.close() |
991 | 991 |
992 def _runcommand(ui, options, cmd, cmdfunc): | 992 def _runcommand(ui, options, cmd, cmdfunc): |
993 """Run a command function, possibly with profiling enabled.""" | 993 """Run a command function, possibly with profiling enabled.""" |
994 try: | 994 try: |
995 return cmdfunc() | 995 with tracing.log("Running %s command" % cmd): |
996 return cmdfunc() | |
996 except error.SignatureError: | 997 except error.SignatureError: |
997 raise error.CommandError(cmd, _('invalid arguments')) | 998 raise error.CommandError(cmd, _('invalid arguments')) |
998 | 999 |
999 def _exceptionwarning(ui): | 1000 def _exceptionwarning(ui): |
1000 """Produce a warning message for the current active exception""" | 1001 """Produce a warning message for the current active exception""" |