changeset 2506:747dc7067751

stablerange: also respect the 'warm-cache' config This will help large install to enable obshashrange as "opt-in" without impacting other repositories.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 30 May 2017 11:55:58 +0200
parents 7fd55c5efffb
children de6c61462e67
files hgext3rd/evolve/stablerange.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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):