# HG changeset patch # User Pierre-Yves David # Date 1513826625 -3600 # Node ID 0370c8503e2f29feed9a4b68c5a979a71d717a9a # Parent a4edd014c166d841ed60f36373345a823b1e45b8 stablesort: cleanup the update logic diff -r a4edd014c166 -r 0370c8503e2f hgext3rd/evolve/stablesort.py --- a/hgext3rd/evolve/stablesort.py Thu Dec 21 04:22:36 2017 +0100 +++ b/hgext3rd/evolve/stablesort.py Thu Dec 21 04:23:45 2017 +0100 @@ -671,9 +671,9 @@ if util.safehasattr(repo, 'updatecaches'): @localrepo.unfilteredmethod def updatecaches(self, tr=None): - if utility.shouldwarmcache(repo): - self.stablesort.update(repo) - self.stablesort.save(repo) + if utility.shouldwarmcache(self): + self.stablesort.update(self) + self.stablesort.save(self) super(stablesortrepo, self).updatecaches(tr) else: @@ -686,8 +686,10 @@ if repo is None: return repo = repo.unfiltered() + repo.stablesort.update(repo) + repo.stablesort.save(repo) - if utility.shouldwarmcache(repo): + if utility.shouldwarmcache(self): tr.addpostclose('warmcache-02stablesort', _warmcache) return tr