slicesrangeat: stop double setting the revsinranges cache
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 23 Mar 2017 10:49:03 +0100
changeset 2206 84537469a094
parent 2205 bd5e2496e5cd
child 2207 f82a398162f5
slicesrangeat: stop double setting the revsinranges cache The cache should have already been filled by the logic warming the cache for the parent.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Thu Mar 23 10:44:12 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Thu Mar 23 10:49:03 2017 +0100
@@ -362,10 +362,9 @@
         topsize = rangedepth - globalindex
 
         parentrange = (p1, rangeid[1])
-        # if we have an entry for the current range, lets update the cache
         if rangeid in self._revsinrangecache:
-            parentrevs = self._revsinrangecache[rangeid][:-1]
-            self._revsinrangecache[parentrange] = parentrevs
+            # revs cache should have been filled by _unpreparedparentrange
+            assert parentrange in self._revsinrangecache
 
         if topsize == 1:
             top = (rangeid[0], globalindex)