From patchwork Wed Feb 21 20:40:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2376: mq: don't reimplement any() From: phabricator X-Patchwork-Id: 28210 Message-Id: <042f7c9f5365b267bc9d1263d0cf2468@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Wed, 21 Feb 2018 20:40:39 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHGc8891cc3fa9e: mq: don't reimplement any() (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2376?vs=5956&id=5962 REVISION DETAIL https://phab.mercurial-scm.org/D2376 AFFECTED FILES hgext/mq.py CHANGE DETAILS To: martinvonz, #hg-reviewers, durin42 Cc: durin42, mercurial-devel diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -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: