changeset 449:4f23f224afb4

obsolete: Improves cache invalidation logic Filecache are not the same that cache property. This can probably be improved
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Wed, 08 Aug 2012 11:10:43 +0200
parents 96c896f0180b
children 4d18739b506b
files hgext/obsolete.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/obsolete.py	Tue Aug 07 21:39:55 2012 +0200
+++ b/hgext/obsolete.py	Wed Aug 08 11:10:43 2012 +0200
@@ -358,9 +358,9 @@
 
 ### 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')