stablerange: also respect the 'warm-cache' config
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 30 May 2017 11:55:58 +0200
changeset 2506 747dc7067751
parent 2505 7fd55c5efffb
child 2507 de6c61462e67
stablerange: also respect the 'warm-cache' config This will help large install to enable obshashrange as "opt-in" without impacting other repositories.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Tue May 30 11:49:00 2017 +0200
+++ b/hgext3rd/evolve/stablerange.py	Tue May 30 11:55:58 2017 +0200
@@ -935,6 +935,9 @@
             tr = super(stablerangerepo, self).transaction(*args, **kwargs)
             if not repo.ui.configbool('experimental', 'obshashrange', False):
                 return tr
+            if not repo.ui.configbool('experimental', 'obshashrange.warm-cache',
+                                      True):
+                return tr
             reporef = weakref.ref(self)
 
             def _warmcache(tr):