revsfromrange: set the cache for the top range in merge slicing
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 20:55:23 +0100
changeset 2191 dd5b948a98b4
parent 2190 f4cc3cf27a3a
child 2192 195c0d7a6b7c
revsfromrange: set the cache for the top 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:44:29 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 20:55:23 2017 +0100
@@ -352,7 +352,8 @@
         allrevs = self.revsfromrange(repo, rangeid)
         toprevs = allrevs[localindex:]
         bottomrevs = allrevs[:localindex]
-        top = stablerange(repo, rangeid[0], globalindex, toprevs)
+        top = stablerange(repo, rangeid[0], globalindex)
+        self._revsinrangecache[top] = toprevs # update cache
         #
         rangedepth = repo.stablerange.depthrev(repo, rangeid[0])
         toprootdepth = repo.stablerange.depthrev(repo, toprevs[0])