Mercurial > hg-stable
changeset 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 | a0ed0d0dd713 |
children | 184cf2fa1046 |
files | mercurial/revset.py |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
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,