Mercurial > hg
diff mercurial/revset.py @ 13908:ba669bc7f851
revset: replace for-loop with list comprehension
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Thu, 07 Apr 2011 16:20:40 +0300 |
parents | a8d13ee0ce68 |
children | 27573f2ddfb9 |
line wrap: on
line diff
--- 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,