Mercurial > evolve
changeset 3367:c26dc74b828d
caches: extract some config reading in 'shouldwarmcache'
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 05 Jan 2018 04:26:51 +0100 |
parents | 83b372eceb81 |
children | 7310f3ef6dee |
files | hgext3rd/evolve/utility.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/utility.py Fri Jan 05 03:35:07 2018 +0100 +++ b/hgext3rd/evolve/utility.py Fri Jan 05 04:26:51 2018 +0100 @@ -39,9 +39,11 @@ def shouldwarmcache(repo, tr): configbool = repo.ui.configbool + warm = configbool('experimental', 'obshashrange.warm-cache', True) + if not configbool('experimental', 'obshashrange', False): return False - if not configbool('experimental', 'obshashrange.warm-cache', True): + if not warm: return False maxrevs = repo.ui.configint('experimental', 'obshashrange.max-revs', None) if maxrevs is not None and maxrevs < len(repo.unfiltered()):