mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
discovery: limit 'all local heads known remotely' to real 'all' (issue4438)
2ec3e28dea6b 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.
This commit is contained in:
parent
298c02c65a
commit
8079358ce3
@ -165,7 +165,7 @@ def findcommonheads(ui, local, remote,
|
||||
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,)
|
||||
|
Loading…
Reference in New Issue
Block a user