revset: replace for-loop with list comprehension
authorIdan Kamara <idankk86@gmail.com>
Thu, 07 Apr 2011 16:20:40 +0300
changeset 13908 ba669bc7f851
parent 13907 a0ed0d0dd713
child 13909 184cf2fa1046
revset: replace for-loop with list comprehension
mercurial/revset.py
--- a/mercurial/revset.py	Thu Apr 07 09:47:30 2011 -0500
+++ b/mercurial/revset.py	Thu Apr 07 16:20:40 2011 +0300
@@ -698,11 +698,7 @@
     if state not in ('good', 'bad', 'skip', 'unknown'):
         raise ParseError(_('invalid bisect state'))
     marked = set(repo.changelog.rev(n) for n in hbisect.load_state(repo)[state])
-    l = []
-    for r in subset:
-        if r in marked:
-            l.append(r)
-    return l
+    return [r for r in subset if r in marked]
 
 symbols = {
     "adds": adds,