changeset 2236:c0e2ba85e76a

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
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 24 Mar 2017 18:41:55 +0100
parents eadb1c69e350
children 98e0369b548b
files hgext3rd/evolve/stablerange.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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