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

Boris Feld boris.feld at octobus.net
Sun Oct 1 14:32:28 EDT 2017


# HG changeset patch
# User Boris Feld <boris.feld at 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

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)


More information about the Mercurial-devel mailing list