# HG changeset patch # User Pierre-Yves David # Date 1493734501 -7200 # Node ID 8534400111fd2cd2eb2045c94722a95a9ef6c148 # Parent acd2431dff29adeb09587022c8dcbc117374713b obscache: warm the cache in all cases There are case when the obsstore have been invalidated, but we still need to update the cache. diff -r acd2431dff29 -r 8534400111fd hgext3rd/evolve/obscache.py --- a/hgext3rd/evolve/obscache.py Tue May 02 16:11:43 2017 +0200 +++ b/hgext3rd/evolve/obscache.py Tue May 02 16:15:01 2017 +0200 @@ -365,15 +365,14 @@ repo = reporef() if repo is None: return - if 'obsstore' in vars(self): - repo = repo.unfiltered() - # As pointed in 'obscache.update', we could have the - # changelog and the obsstore in charge of updating the - # cache when new items goes it. The tranaction logic would - # then only be involved for the 'pending' and final saving - # logic. - self.obsstore.obscache.update(repo) - self.obsstore.obscache.save(repo) + repo = repo.unfiltered() + # As pointed in 'obscache.update', we could have the + # changelog and the obsstore in charge of updating the + # cache when new items goes it. The tranaction logic would + # then only be involved for the 'pending' and final saving + # logic. + self.obsstore.obscache.update(repo) + self.obsstore.obscache.save(repo) tr.addpostclose('warmcache-obscache', _warmcache) return tr