Mercurial > hg-stable
changeset 23192:73cfaa348650 stable
discovery: indices between sample and yesno must match (issue4438)
3ef893520a85 changed 'sample' from a list to a set. The iteration order is thus
undefined and the yesno indices are not stable.
To solve this, repeat the listification and comment from elsewhere in the code.
Note: the randomness in the discovery protocol can make this problem hard to
reproduce.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 05 Nov 2014 13:05:32 +0100 |
parents | 86c35b7ae300 |
children | 14c6aab35a39 c35ffa4249ca |
files | mercurial/setdiscovery.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/setdiscovery.py Wed Nov 05 13:05:29 2014 +0100 +++ b/mercurial/setdiscovery.py Wed Nov 05 13:05:32 2014 +0100 @@ -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()