revsfromrange: set the cache for the multiple bottom ranges in merge slicing
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 20:56:17 +0100
changeset 2193 47bc8aa0730d
parent 2192 195c0d7a6b7c
child 2194 8e7b2918e1a3
revsfromrange: set the cache for the multiple bottom ranges in merge slicing We no longer rely on the object magic here.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 20:55:43 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 20:56:17 2017 +0100
@@ -381,7 +381,9 @@
                 subset = cl.ancestors([h], inclusive=True)
                 hrevs = [r for r in bottomrevs if r in subset]
                 start = repo.stablerange.depthrev(repo, h) - len(hrevs)
-                entry = stablerange(repo, h, start, [r for r in bottomrevs if r in subset])
+                entry = stablerange(repo, h, start)
+                entryrevs = [r for r in bottomrevs if r in subset]
+                self._revsinrangecache[entry] = entryrevs # update cache
                 result.append(entry)
         result.append(top)
         return result