scmutil: changed revrange code not to use append
authorLucas Moscovicz <lmoscovicz@fb.com>
Mon, 24 Feb 2014 09:27:32 -0800
changeset 20559 165b117ffc1e
parent 20558 c4f45ce85351
child 20563 06f46bad8714
scmutil: changed revrange code not to use append Removed one call to the append method
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Tue Feb 25 04:11:11 2014 +0530
+++ b/mercurial/scmutil.py	Mon Feb 24 09:27:32 2014 -0800
@@ -490,7 +490,7 @@
             return defval
         return repo[val].rev()
 
-    seen, l = set(), []
+    seen, l = set(), revset.baseset([])
     for spec in revs:
         if l and not seen:
             seen = set(l)
@@ -511,7 +511,7 @@
                 rangeiter = repo.changelog.revs(start, end)
                 if not seen and not l:
                     # by far the most common case: revs = ["-1:0"]
-                    l = list(rangeiter)
+                    l = revset.baseset(rangeiter)
                     # defer syncing seen until next iteration
                     continue
                 newrevs = set(rangeiter)
@@ -527,7 +527,7 @@
                 if rev in seen:
                     continue
                 seen.add(rev)
-                l.append(rev)
+                l = l + [rev]
                 continue
         except error.RepoLookupError:
             pass