# HG changeset patch # User Martin von Zweigbergk # Date 1520177986 28800 # 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 -r 613954a17a25 -r bf485b70d0ae mercurial/setdiscovery.py --- a/mercurial/setdiscovery.py Sun Mar 04 07:37:08 2018 -0800 +++ b/mercurial/setdiscovery.py Sun Mar 04 07:39:46 2018 -0800 @@ -175,7 +175,7 @@ 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,)