Patchwork D6746: perf: don't pass experimental argument in config for older Mercurial versions

login
register
mail settings
Submitter phabricator
Date Aug. 20, 2019, 3:19 p.m.
Message ID <232827bfb2e7988c669ea1ef7522e86b@localhost.localdomain>
Download mbox | patch
Permalink /patch/41358/
State Not Applicable
Headers show

Comments

phabricator - Aug. 20, 2019, 3:19 p.m.
navaneeth.suresh marked an inline comment as done.
navaneeth.suresh updated this revision to Diff 16271.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6746?vs=16268&id=16271

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6746/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6746

AFFECTED FILES
  contrib/perf.py

CHANGE DETAILS




To: navaneeth.suresh, #hg-reviewers
Cc: pulkit, mercurial-devel

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -267,6 +267,30 @@ 
     )
 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,
+    )
+    configitem(b'perf', b'parentscount',
+        default=mercurial.configitems.dynamicdefault,
+    )
+    configitem(b'perf', b'all-timing',
+        default=mercurial.configitems.dynamicdefault,
+    )
+    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,
+    )
 
 def getlen(ui):
     if ui.configbool(b"perf", b"stub", False):