changeset 22805:e74245b79901

revset-last: remove user of baseset.append A `baseset` has multiple cached results and will get even more in the future. Making it an object "populated once" like the other smartsets makes it both safer and simpler. The append method will be removed at some point.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 08 Oct 2014 00:55:09 -0700
parents 5385314e0b14
children 65ccc733d58e
files mercurial/revset.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Mon Oct 06 10:57:01 2014 -0700
+++ b/mercurial/revset.py	Wed Oct 08 00:55:09 2014 -0700
@@ -1043,16 +1043,16 @@
     ss = subset.set()
     os = getset(repo, spanset(repo), l[0])
     os.reverse()
-    bs = baseset()
+    result = []
     it = iter(os)
     for x in xrange(lim):
         try:
             y = it.next()
             if y in ss:
-                bs.append(y)
+                result.append(y)
         except (StopIteration):
             break
-    return bs
+    return baseset(result)
 
 def maxrev(repo, subset, x):
     """``max(set)``