# HG changeset patch # User Martin von Zweigbergk # Date 1517935932 28800 # Node ID 06464d1ce6cd8b7b651b97ad31e199756fad1695 # Parent a4d41ba4ad23f23b4da3fa7cb99c4ef7cbb16d20 convert: don't reimplement any() Differential Revision: https://phab.mercurial-scm.org/D2373 diff -r a4d41ba4ad23 -r 06464d1ce6cd hgext/convert/hg.py --- 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: