Skip to content
Snippets Groups Projects
Commit 86c35b7a authored by Mads Kiilerich's avatar Mads Kiilerich
Browse files

discovery: limit 'all local heads known remotely' to real 'all' (issue4438)

3ef893520a85 made it possible that the initial head check didn't include all
heads. If that is the case, don't use the early exit just because this random
sample happened to be 'all known'.

Note: the randomness in the discovery protocol can make this problem hard to
reproduce.
parent a3c2d921
Branches
Tags
No related merge requests found
......@@ -165,7 +165,7 @@
ui.debug("all remote heads known locally\n")
return (srvheadhashes, False, srvheadhashes,)
if sample and util.all(yesno):
if sample and len(ownheads) <= initialsamplesize and util.all(yesno):
ui.note(_("all local heads known remotely\n"))
ownheadhashes = dag.externalizeall(ownheads)
return (ownheadhashes, True, srvheadhashes,)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment