changeset 3962:ebf6556b9650 stable

obshashrange: clear in-memory cache alongside the sqlite one Clearing on disk data in nice, but we also need to remove in memory one or we'll get incorrect results.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 17 Aug 2018 12:06:43 +0200
parents ce50e788d88c
children d2e9a03fb3f7
files hgext3rd/evolve/obsdiscovery.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obsdiscovery.py	Fri Aug 17 01:04:49 2018 +0200
+++ b/hgext3rd/evolve/obsdiscovery.py	Fri Aug 17 12:06:43 2018 +0200
@@ -475,9 +475,12 @@
                     # so we need to reset more broadly than we would like.
                     if repo.stablerange._con is None:
                         con.execute(_reset)
+                        self._data.clear()
                     else:
                         ranges = repo.stablerange.contains(repo, affected)
                         con.executemany(_delete, ranges)
+                        for r in ranges:
+                            self._data.pop(r, None)
 
                 # rewarm key revisions
                 #