diff contrib/perf.py @ 42760:9f2189b6bf2a

config: add experimental argument to the config registrar Until now, there are almost 28 config items which are considered as `experimental` but, not present in the `experimental` section of the registrar. This patch adds an `experimental` argument to the config registrar to mark such config items. Differential Revision: https://phab.mercurial-scm.org/D6728 Differential Revision: https://phab.mercurial-scm.org/D6746
author Navaneeth Suresh <navaneeths1998@gmail.com>
date Tue, 20 Aug 2019 18:35:16 +0300
parents bc4373babd04
children c8d3af9c7e65
line wrap: on
line diff
--- a/contrib/perf.py	Wed Aug 14 16:11:45 2019 -0400
+++ b/contrib/perf.py	Tue Aug 20 18:35:16 2019 +0300
@@ -241,6 +241,37 @@
     configitem = mercurial.registrar.configitem(configtable)
     configitem(b'perf', b'presleep',
         default=mercurial.configitems.dynamicdefault,
+        experimental=True,
+    )
+    configitem(b'perf', b'stub',
+        default=mercurial.configitems.dynamicdefault,
+        experimental=True,
+    )
+    configitem(b'perf', b'parentscount',
+        default=mercurial.configitems.dynamicdefault,
+        experimental=True,
+    )
+    configitem(b'perf', b'all-timing',
+        default=mercurial.configitems.dynamicdefault,
+        experimental=True,
+    )
+    configitem(b'perf', b'pre-run',
+        default=mercurial.configitems.dynamicdefault,
+    )
+    configitem(b'perf', b'profile-benchmark',
+        default=mercurial.configitems.dynamicdefault,
+    )
+    configitem(b'perf', b'run-limits',
+        default=mercurial.configitems.dynamicdefault,
+        experimental=True,
+    )
+except (ImportError, AttributeError):
+    pass
+except TypeError:
+    # compatibility fix for a11fd395e83f
+    # hg version: 5.2
+    configitem(b'perf', b'presleep',
+        default=mercurial.configitems.dynamicdefault,
     )
     configitem(b'perf', b'stub',
         default=mercurial.configitems.dynamicdefault,
@@ -260,8 +291,6 @@
     configitem(b'perf', b'run-limits',
         default=mercurial.configitems.dynamicdefault,
     )
-except (ImportError, AttributeError):
-    pass
 
 def getlen(ui):
     if ui.configbool(b"perf", b"stub", False):