Mercurial > hg-stable
changeset 36375:02c35e640b3c
mq: don't reimplement any()
Differential Revision: https://phab.mercurial-scm.org/D2375
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 06 Feb 2018 08:55:54 -0800 |
parents | 28a97cf212af |
children | c8891cc3fa9e |
files | hgext/mq.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Tue Feb 06 08:54:36 2018 -0800 +++ b/hgext/mq.py Tue Feb 06 08:55:54 2018 -0800 @@ -553,10 +553,8 @@ for patchfn in patches: patchf = self.opener(patchfn, 'r') # if the patch was a git patch, refresh it as a git patch - for line in patchf: - if line.startswith('diff --git'): - diffopts.git = True - break + diffopts.git = any(line.startswith('diff --git') + for line in patchf) patchf.close() return diffopts