# HG changeset patch # User Pierre-Yves David # Date 1513826513 -3600 # Node ID b98f9cd845818775ec5ebb0b04fddc40eec4b29a # Parent 0539070016b05406bf82fc0bb3d3bf130877fe33 depthcache: cleanup the update logic diff -r 0539070016b0 -r b98f9cd84581 hgext3rd/evolve/depthcache.py --- 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