Mercurial > evolve
changeset 1085:0f31e3c44d82
evolve: use pushkeyescape from core
It exists for all version we are compatible with.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 27 Aug 2014 17:49:08 +0200 |
parents | 5459d9f48fea |
children | 96b9e0c31cc1 |
files | hgext/evolve.py |
diffstat | 1 files changed, 0 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Wed Aug 27 17:55:20 2014 +0200 +++ b/hgext/evolve.py Wed Aug 27 17:49:08 2014 +0200 @@ -2337,29 +2337,6 @@ _pushkeyescape = getattr(obsolete, '_pushkeyescape', None) -if _pushkeyescape is None: - _maxpayload = 5300 - def _pushkeyescape(markers): - """encode markers into a dict suitable for pushkey exchange - - - binary data are base86 encoded - - splited in chunk less than 5300 bytes""" - parts = [] - currentlen = _maxpayload * 2 # ensure we create a new part - for marker in markers: - nextdata = obsolete._encodeonemarker(marker) - if (len(nextdata) + currentlen > _maxpayload): - currentpart = [] - currentlen = 0 - parts.append(currentpart) - currentpart.append(nextdata) - currentlen += len(nextdata) - keys = {} - for idx, part in enumerate(reversed(parts)): - data = ''.join([_pack('>B', 0)] + part) - keys['dump%i' % idx] = base85.b85encode(data) - return keys - def _encodemarkersstream(fp, markers): fp.write(_pack('>B', 0)) for mark in markers: