changeset 36340:06464d1ce6cd

convert: don't reimplement any() Differential Revision: https://phab.mercurial-scm.org/D2373
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 06 Feb 2018 08:52:12 -0800
parents a4d41ba4ad23
children 28a97cf212af
files hgext/convert/hg.py
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/hg.py	Tue Feb 06 08:49:37 2018 -0800
+++ b/hgext/convert/hg.py	Tue Feb 06 08:52:12 2018 -0800
@@ -563,12 +563,7 @@
                 if copysource in self.ignored:
                     continue
                 # Ignore copy sources not in parent revisions
-                found = False
-                for p in parents:
-                    if copysource in p:
-                        found = True
-                        break
-                if not found:
+                if not any(copysource in p for p in parents):
                     continue
                 copies[name] = copysource
             except TypeError: