mq: don't reimplement any()
Differential Revision: https://phab.mercurial-scm.org/D2376
--- a/hgext/mq.py Tue Feb 06 08:55:54 2018 -0800
+++ b/hgext/mq.py Tue Feb 06 08:57:22 2018 -0800
@@ -1555,12 +1555,8 @@
update = True
else:
parents = [p.node() for p in repo[None].parents()]
- needupdate = False
- for entry in self.applied[start:]:
- if entry.node in parents:
- needupdate = True
- break
- update = needupdate
+ update = any(entry.node in parents
+ for entry in self.applied[start:])
tobackup = set()
if update: