changeset 2303:8534400111fd

obscache: warm the cache in all cases There are case when the obsstore have been invalidated, but we still need to update the cache.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 02 May 2017 16:15:01 +0200
parents acd2431dff29
children 2f15090712fe
files hgext3rd/evolve/obscache.py
diffstat 1 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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