Patchwork [4,of,4] configitems: register the 'profiling.type' config

login
register
mail settings
Submitter Boris Feld
Date Oct. 1, 2017, 6:32 p.m.
Message ID <f57cc93de27e7f6594f2.1506882748@FB>
Download mbox | patch
Permalink /patch/24370/
State Accepted
Headers show

Comments

Boris Feld - Oct. 1, 2017, 6:32 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1498787040 -7200
#      Fri Jun 30 03:44:00 2017 +0200
# Node ID f57cc93de27e7f6594f2588cd2496f6bddf7024c
# Parent  dcee30ee38b6865c13b03bcbe4e817341dca1a15
# EXP-Topic config.register.profiling
configitems: register the 'profiling.type' config

Patch

diff -r dcee30ee38b6 -r f57cc93de27e mercurial/configitems.py
--- 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,
 )
diff -r dcee30ee38b6 -r f57cc93de27e mercurial/profiling.py
--- 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)