# HG changeset patch # User Pierre-Yves David # Date 1513826556 -3600 # Node ID a4edd014c166d841ed60f36373345a823b1e45b8 # Parent b98f9cd845818775ec5ebb0b04fddc40eec4b29a firstmergecache: cleanup the update logic diff -r b98f9cd84581 -r a4edd014c166 hgext3rd/evolve/firstmergecache.py --- a/hgext3rd/evolve/firstmergecache.py Thu Dec 21 04:21:53 2017 +0100 +++ b/hgext3rd/evolve/firstmergecache.py Thu Dec 21 04:22:36 2017 +0100 @@ -40,9 +40,9 @@ if util.safehasattr(repo, 'updatecaches'): @localrepo.unfilteredmethod def updatecaches(self, tr=None): - if utility.shouldwarmcache(repo): - self.firstmergecache.update(repo) - self.firstmergecache.save(repo) + if utility.shouldwarmcache(self): + self.firstmergecache.update(self) + self.firstmergecache.save(self) super(firstmergecacherepo, self).updatecaches(tr) else: @@ -55,10 +55,10 @@ if repo is None: return repo = repo.unfiltered() - self.firstmergecache.update(repo) - self.firstmergecache.save(repo) + repo.firstmergecache.update(repo) + repo.firstmergecache.save(repo) - if utility.shouldwarmcache(repo): + if utility.shouldwarmcache(self): tr.addpostclose('warmcache-01-firstparentcache', _warmcache) return tr