revsfromrange: skip setting the cache for length-1 top entry
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 20:37:03 +0100
changeset 2188 b8a8b7ee26b7
parent 2187 c583efbaec78
child 2189 40b0e1dbed90
revsfromrange: skip setting the cache for length-1 top entry The content of the range is trivial to compute.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 20:36:19 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 20:37:03 2017 +0100
@@ -325,7 +325,7 @@
             self._revsinrangecache[parentrange] = parentrevs
 
         if topsize == 1:
-            top = stablerange(repo, rangeid[0], globalindex, [rangeid[0]])
+            top = stablerange(repo, rangeid[0], globalindex)
             return [parentrange, top]
         else:
             # XXX recursive call, python have issue with them