[PATCH STABLE] obsolete: properly increment the currentlen in pushkey building
pierre-yves.david at logilab.fr
pierre-yves.david at logilab.fr
Tue Jul 31 08:27:27 CDT 2012
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1343737116 -7200
# Branch stable
# Node ID e7c08088d92c6d8f4ce0194b7c7c29bc1a7f0175
# Parent 2e8342aeab498f6f429e63e81a849830f0478815
obsolete: properly increment the currentlen in pushkey building
In the old code, the current length were always 0 lead to no splitting of the
marker at all.
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -271,10 +271,11 @@ def listmarkers(repo):
if (len(nextdata) + currentlen > _maxpayload):
currentpart = []
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)
return keys
More information about the Mercurial-devel
mailing list