Mercurial > hg-stable
changeset 36739:bf485b70d0ae
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 04 Mar 2018 07:39:46 -0800 |
parents | 613954a17a25 |
children | 0968e400406c |
files | mercurial/setdiscovery.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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,)