mercurial/dispatch.py
changeset 32788 eede022fc142
parent 32787 545f69cd6042
child 33052 45b0e9d05ee9
--- a/mercurial/dispatch.py	Fri Jun 09 12:36:07 2017 +0100
+++ b/mercurial/dispatch.py	Fri Jun 09 12:29:29 2017 +0100
@@ -764,7 +764,8 @@
         for ui_ in uis:
             ui_.setconfig('profiling', 'enabled', 'true', '--profile')
 
-    with profiling.maybeprofile(lui) as profiler:
+    profile = lui.configbool('profiling', 'enabled')
+    with profiling.profile(lui, enabled=profile) as profiler:
         # Configure extensions in phases: uisetup, extsetup, cmdtable, and
         # reposetup. Programs like TortoiseHg will call _dispatch several
         # times so we keep track of configured extensions in _loaded.