stablerange: drop the cache on 'destroyed'
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Fri, 24 Mar 2017 18:41:55 +0100
changeset 2236 c0e2ba85e76a
parent 2235 eadb1c69e350
child 2237 98e0369b548b
stablerange: drop the cache on 'destroyed' if the repository have been strip, the cache is not usable as is. We could be smarter in the invalidation but that is a prototype anyway. G: changed hgext3rd/evolve/stablerange.py
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Fri Mar 24 11:27:56 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Fri Mar 24 18:41:55 2017 +0100
@@ -670,4 +670,9 @@
         def stablerange(self):
             return stablerange()
 
+        @localrepo.unfilteredmethod
+        def destroyed(self):
+            if 'stablerange' in vars(self):
+                del self.stablerange
+
     repo.__class__ = stablerangerepo