changeset 34412:83dfbda40e67

configitems: register the 'profiling.type' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 03:44:00 +0200
parents f5c16e6507e8
children 014d467f9d08
files mercurial/configitems.py mercurial/profiling.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Fri Jun 30 03:43:57 2017 +0200
+++ b/mercurial/configitems.py	Fri Jun 30 03:44:00 2017 +0200
@@ -350,6 +350,9 @@
 coreconfigitem('profiling', 'statformat',
     default='hotpath',
 )
+coreconfigitem('profiling', 'type',
+    default='stat',
+)
 coreconfigitem('progress', 'assume-tty',
     default=False,
 )
--- a/mercurial/profiling.py	Fri Jun 30 03:43:57 2017 +0200
+++ b/mercurial/profiling.py	Fri Jun 30 03:44:00 2017 +0200
@@ -183,7 +183,7 @@
         profiler = encoding.environ.get('HGPROF')
         proffn = None
         if profiler is None:
-            profiler = self._ui.config('profiling', 'type', default='stat')
+            profiler = self._ui.config('profiling', 'type')
         if profiler not in ('ls', 'stat', 'flame'):
             # try load profiler from extension with the same name
             proffn = _loadprofiler(self._ui, profiler)