diff mercurial/pushkey.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 7b200566e474
children 57875cf423c9
line wrap: on
line diff