comparison mercurial/progress.py @ 29784:e3501546f7e4

profiling: add a context manager that no-ops if profiling isn't enabled And refactor dispatch.py to use it. As you can see, the resulting code is much simpler. I was tempted to inline _runcommand as part of writing this series. However, a number of extensions wrap _runcommand. So keeping it around is necessary (extensions can't easily wrap runcommand because it calls hooks before and after command execution).
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 14 Aug 2016 17:51:12 -0700
parents 222b8170d69e
children cb1ea3cc44b5
comparison
equal deleted inserted replaced
29783:5d44197c208b 29784:e3501546f7e4