Commits

Pierre-Yves David committed 4f23f22

obsolete: Improves cache invalidation logic

Filecache are not the same that cache property.
This can probably be improved

Comments (0)

Files changed (1)

hgext/obsolete.py

 
 ### cache clean up
 def clearobscaches(repo):
-    #if 'obsstore' in vars(repo):
-    # should work great but cache invalidation act strange
-    repo.obsstore.caches.clear()
+    """"""
+    if 'obsstore' in repo._filecache:
+        repo.obsstore.caches.clear()
 
 @eh.wrapfunction(localrepo.localrepository, 'updatebranchcache')
 @eh.wrapfunction(phases, 'advanceboundary')