# HG changeset patch # User Martin von Zweigbergk # Date 2018-02-06 16:57:22 # Node ID c8891cc3fa9ec855a3bdefd3dd759d19927c6b85 # Parent 02c35e640b3c2f7175cf3a7fe190471bbf1ebdb9 mq: don't reimplement any() Differential Revision: https://phab.mercurial-scm.org/D2376 diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1555,12 +1555,8 @@ class queue(object): 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: