mercurial/revset.py
changeset 22804 5385314e0b14
parent 22802 1fcd361efaf4
child 22805 e74245b79901
--- a/mercurial/revset.py	Tue Oct 07 00:12:56 2014 -0700
+++ b/mercurial/revset.py	Mon Oct 06 10:57:01 2014 -0700
@@ -1015,16 +1015,16 @@
         raise error.ParseError(_("limit expects a number"))
     ss = subset.set()
     os = getset(repo, spanset(repo), l[0])
-    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 last(repo, subset, x):
     """``last(set, [n])``