[PATCH 05 of 14] configitems: register the 'perf.stub' config
Boris Feld
boris.feld at octobus.net
Fri Oct 6 09:22:21 UTC 2017
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1498787026 -7200
# Fri Jun 30 03:43:46 2017 +0200
# Node ID bbb5687e5140869ef504720317147dc229da1248
# Parent c4a2db2cc0fbe473a7649b591c55e7696638e03e
# EXP-Topic config.register.perf
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r bbb5687e5140
configitems: register the 'perf.stub' config
diff -r c4a2db2cc0fb -r bbb5687e5140 contrib/perf.py
--- a/contrib/perf.py Fri Jun 30 03:32:25 2017 +0200
+++ b/contrib/perf.py Fri Jun 30 03:43:46 2017 +0200
@@ -139,6 +139,16 @@
return func
return decorator
+try:
+ import registrar
+ configtable = {}
+ configitem = registrar.configitem(configtable)
+ configitem('perf', 'stub',
+ default=False,
+ )
+except (ImportError, AttributeError):
+ pass
+
def getlen(ui):
if ui.configbool("perf", "stub"):
return lambda x: 1
More information about the Mercurial-devel
mailing list