# HG changeset patch # User Martin von Zweigbergk # Date 1517936242 28800 # Node ID c8891cc3fa9ec855a3bdefd3dd759d19927c6b85 # Parent 02c35e640b3c2f7175cf3a7fe190471bbf1ebdb9 mq: don't reimplement any() Differential Revision: https://phab.mercurial-scm.org/D2376 diff -r 02c35e640b3c -r c8891cc3fa9e hgext/mq.py --- 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: