scmutil: speed up new-style range extension
This improves perfrevset performance by 10% for 2222::33333 on a
kernel repo.
--- a/mercurial/scmutil.py Tue Jun 26 14:32:20 2012 +0200
+++ b/mercurial/scmutil.py Fri Jun 22 12:00:41 2012 -0700
@@ -584,10 +584,9 @@
# fall through to new-style queries if old-style fails
m = revset.match(repo.ui, spec)
- for r in m(repo, range(len(repo))):
- if r not in seen:
- l.append(r)
- seen.update(l)
+ dl = [r for r in m(repo, xrange(len(repo))) if r not in seen]
+ l.extend(dl)
+ seen.update(dl)
return l