# HG changeset patch # User Martin von Zweigbergk # Date 2018-02-01 18:10:01 # Node ID 6c1d3779c052935279f01217621d20d7206f422d # Parent 6e7fae8f1c6c6521230e172540ff14f048852ee6 discovery: don't reimplement all() Differential Revision: https://phab.mercurial-scm.org/D1993 diff --git a/mercurial/discovery.py b/mercurial/discovery.py --- a/mercurial/discovery.py +++ b/mercurial/discovery.py @@ -53,13 +53,8 @@ def findcommonincoming(repo, remote, hea return treediscovery.findcommonincoming(repo, remote, heads, force) if heads: - allknown = True knownnode = repo.changelog.hasnode # no nodemap until it is filtered - for h in heads: - if not knownnode(h): - allknown = False - break - if allknown: + if all(knownnode(h) for h in heads): return (heads, False, heads) res = setdiscovery.findcommonheads(repo.ui, repo, remote, heads,