obshashrange: properly invalidate the cache on destroyed
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 12 May 2017 20:52:19 +0200
changeset 2363 2ceb122fcc33
parent 2362 22c35d07ddb3
child 2364 9b68e65fad4f
obshashrange: properly invalidate the cache on destroyed Copy paste is the scurge of code source.
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/obsdiscovery.py	Fri May 12 20:49:27 2017 +0200
+++ b/hgext3rd/evolve/obsdiscovery.py	Fri May 12 20:52:19 2017 +0200
@@ -592,8 +592,8 @@
     class obshashrepo(repo.__class__):
         @localrepo.unfilteredmethod
         def destroyed(self):
-            if 'stablerange' in vars(self):
-                del self.stablerange
+            if 'obsstore' in vars(self):
+                self.obsstore.rangeobshashcache.clear()
             super(obshashrepo, self).destroyed()
 
     repo.__class__ = obshashrepo