revsfromrange: set the cache for the single bottom range in merge slicing
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 20:55:43 +0100
changeset 2192 195c0d7a6b7c
parent 2191 dd5b948a98b4
child 2193 47bc8aa0730d
revsfromrange: set the cache for the single bottom range 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:23 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 20:55:43 2017 +0100
@@ -371,7 +371,9 @@
             newhead = bottomrevs[-1]
             bottomdepth = repo.stablerange.depthrev(repo, newhead)
             newstart = bottomdepth - len(bottomrevs)
-            result.append(stablerange(repo, newhead, newstart, bottomrevs))
+            bottom = stablerange(repo, newhead, newstart)
+            self._revsinrangecache[bottom] = bottomrevs # update cache
+            result.append(bottom)
         else:
             # assert 1 < len(bheads), (toprootdepth, len(top), len(rangeid))
             cl = repo.changelog