# HG changeset patch # User Martin von Zweigbergk # Date 2018-02-06 16:52:12 # Node ID 06464d1ce6cd8b7b651b97ad31e199756fad1695 # Parent a4d41ba4ad23f23b4da3fa7cb99c4ef7cbb16d20 convert: don't reimplement any() Differential Revision: https://phab.mercurial-scm.org/D2373 diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py --- a/hgext/convert/hg.py +++ b/hgext/convert/hg.py @@ -563,12 +563,7 @@ class mercurial_source(common.converter_ 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: