obsolete: properly increment currentlen when building pushkey payload stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 31 Jul 2012 15:32:08 +0200
branchstable
changeset 17304 0368fc55d572
parent 17303 06217d3cf8d9
child 17305 e66fa4d587dc
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.
mercurial/obsolete.py
--- a/mercurial/obsolete.py	Tue Jul 31 00:59:38 2012 +0200
+++ b/mercurial/obsolete.py	Tue Jul 31 15:32:08 2012 +0200
@@ -273,6 +273,7 @@
             currentlen = 0
             parts.append(currentpart)
         currentpart.append(nextdata)
+        currentlen += len(nextdata)
     for idx, part in enumerate(reversed(parts)):
         data = ''.join([_pack('>B', _fmversion)] + part)
         keys['dump%i' % idx] = base85.b85encode(data)