# HG changeset patch # User Martin von Zweigbergk # Date 2018-03-04 15:39:46 # Node ID bf485b70d0aef13b1b6cccb4770fea664af12661 # Parent 613954a17a2558700bb1f60afd1e6a6ec9921a8a setdiscovery: remove initialsamplesize from a condition It seems more direct to compare the actual sample size. That way we can change the sample taken earlier in the code without breaking the condition. Differential Revision: https://phab.mercurial-scm.org/D2644 diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py --- a/mercurial/setdiscovery.py +++ b/mercurial/setdiscovery.py @@ -175,7 +175,7 @@ def findcommonheads(ui, local, remote, ui.debug("all remote heads known locally\n") return (srvheadhashes, False, srvheadhashes,) - if sample and len(ownheads) <= initialsamplesize and all(yesno): + if len(sample) == len(ownheads) and all(yesno): ui.note(_("all local heads known remotely\n")) ownheadhashes = dag.externalizeall(ownheads) return (ownheadhashes, True, srvheadhashes,)