Mercurial > evolve
changeset 3350:b98f9cd84581
depthcache: cleanup the update logic
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 21 Dec 2017 04:21:53 +0100 |
parents | 0539070016b0 |
children | a4edd014c166 |
files | hgext3rd/evolve/depthcache.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/depthcache.py Thu Dec 21 04:12:02 2017 +0100 +++ b/hgext3rd/evolve/depthcache.py Thu Dec 21 04:21:53 2017 +0100 @@ -78,9 +78,9 @@ if util.safehasattr(repo, 'updatecaches'): @localrepo.unfilteredmethod def updatecaches(self, tr=None): - if utility.shouldwarmcache(repo): - self.depthcache.update(repo) - self.depthcache.save(repo) + if utility.shouldwarmcache(self): + self.depthcache.update(self) + self.depthcache.save(self) super(depthcacherepo, self).updatecaches(tr) else: @@ -93,8 +93,10 @@ if repo is None: return repo = repo.unfiltered() + repo.depthcache.update(repo) + repo.depthcache.save(repo) - if utility.shouldwarmcache(repo): + if utility.shouldwarmcache(self): tr.addpostclose('warmcache-00depthcache', _warmcache) return tr