Mercurial > hg
comparison mercurial/obsolete.py @ 17304:0368fc55d572 stable
obsolete: properly increment currentlen when building pushkey payload
In the old code, the current length was always 0 leading to markers
payload never being split.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 31 Jul 2012 15:32:08 +0200 |
parents | 59c14bf5a48c |
children | b0aad9fb87f9 e93633eb7099 |
comparison
equal
deleted
inserted
replaced
17303:06217d3cf8d9 | 17304:0368fc55d572 |
---|---|
271 if (len(nextdata) + currentlen > _maxpayload): | 271 if (len(nextdata) + currentlen > _maxpayload): |
272 currentpart = [] | 272 currentpart = [] |
273 currentlen = 0 | 273 currentlen = 0 |
274 parts.append(currentpart) | 274 parts.append(currentpart) |
275 currentpart.append(nextdata) | 275 currentpart.append(nextdata) |
276 currentlen += len(nextdata) | |
276 for idx, part in enumerate(reversed(parts)): | 277 for idx, part in enumerate(reversed(parts)): |
277 data = ''.join([_pack('>B', _fmversion)] + part) | 278 data = ''.join([_pack('>B', _fmversion)] + part) |
278 keys['dump%i' % idx] = base85.b85encode(data) | 279 keys['dump%i' % idx] = base85.b85encode(data) |
279 return keys | 280 return keys |
280 | 281 |