obshashcache: invalidate affected cache entries on side
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 17 May 2017 12:25:56 +0200
changeset 2389 8dd4de460b64
parent 2388 385156ab55b8
child 2390 caddf846ca1e
obshashcache: invalidate affected cache entries on side Calling reset during upgrade is screwing up the cache key update.
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/obsdiscovery.py	Wed May 17 12:26:15 2017 +0200
+++ b/hgext3rd/evolve/obsdiscovery.py	Wed May 17 12:25:56 2017 +0200
@@ -434,10 +434,6 @@
 
     def clear(self, reset=False):
         self._valid = False
-        if reset:
-            con = self._con
-            if con is not None:
-                con.execute(_reset)
         super(_obshashcache, self).clear(reset=reset)
         self._data.clear()
         self._new.clear()
@@ -491,9 +487,11 @@
                 for p in l:
                     r = rev(p)
                     if r is not None and r not in setrevs:
-                        repo.ui.log('evoext-cache', ' obshashcache reset - '
+                        repo.ui.log('evoext-cache', 'obshashcache reset - '
                                     'new markers affect cached ranges\n')
-                        self.clear(reset=True)
+                        con = self._con
+                        if con is not None:
+                            con.execute(_reset)
                         break
                 else:
                     continue