Mercurial > hg
comparison mercurial/obsolete.py @ 25149:3f0744eeaeaf
cleanup: use __builtins__.any instead of util.any
any() is available in all Python versions we support now.
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 16 May 2015 14:30:07 -0400 |
parents | e632a2429982 |
children | 22f4ce49044d |
comparison
equal
deleted
inserted
replaced
25148:3b5cd6f13dcc | 25149:3f0744eeaeaf |
---|---|
1115 revs.sort(key=lambda x:x[0]) | 1115 revs.sort(key=lambda x:x[0]) |
1116 unstable = set() | 1116 unstable = set() |
1117 for rev, ctx in revs: | 1117 for rev, ctx in revs: |
1118 # A rev is unstable if one of its parent is obsolete or unstable | 1118 # A rev is unstable if one of its parent is obsolete or unstable |
1119 # this works since we traverse following growing rev order | 1119 # this works since we traverse following growing rev order |
1120 if util.any((x.obsolete() or (x.rev() in unstable)) | 1120 if any((x.obsolete() or (x.rev() in unstable)) |
1121 for x in ctx.parents()): | 1121 for x in ctx.parents()): |
1122 unstable.add(rev) | 1122 unstable.add(rev) |
1123 return unstable | 1123 return unstable |
1124 | 1124 |
1125 @cachefor('suspended') | 1125 @cachefor('suspended') |