Mercurial > hg
changeset 23193:14c6aab35a39
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 05 Nov 2014 11:16:31 -0600 |
parents | 383ff455cab8 (current diff) 73cfaa348650 (diff) |
children | 8c29000c4295 |
files | |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/setdiscovery.py Wed Nov 05 23:24:47 2014 +0900 +++ b/mercurial/setdiscovery.py Wed Nov 05 11:16:31 2014 -0600 @@ -134,6 +134,8 @@ roundtrips += 1 ownheads = dag.heads() sample = _limitsample(ownheads, initialsamplesize) + # indices between sample and externalized version must match + sample = list(sample) if remote.local(): # stopgap until we have a proper localpeer that supports batch() srvheadhashes = remote.heads() @@ -165,7 +167,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,)