--- a/mercurial/obsolete.py Mon Aug 25 16:18:44 2014 +0200
+++ b/mercurial/obsolete.py Mon Aug 25 16:21:33 2014 +0200
@@ -147,8 +147,16 @@
% diskversion)
return diskversion, formats[diskversion][0](data, off)
+def _encodemarkers(markers, addheader=False, version=_fm0version):
+ # Kept separate from flushmarkers(), it will be reused for
+ # markers exchange.
+ encodeone = formats[version][1]
+ if addheader:
+ yield _pack('>B', _fm0version)
+ for marker in markers:
+ yield encodeone(marker)
+
def _fm0readmarkers(data, off=0):
- """Read and enumerate markers from raw data in format version 0"""
# Loop on markers
l = len(data)
while off + _fm0fsize <= l:
@@ -444,15 +452,6 @@
seennodes |= pendingnodes
return seenmarkers
-def _encodemarkers(markers, addheader=False, version=_fm0version):
- # Kept separate from flushmarkers(), it will be reused for
- # markers exchange.
- encodeone = formats[version][1]
- if addheader:
- yield _pack('>B', _fm0version)
- for marker in markers:
- yield encodeone(marker)
-
# arbitrary picked to fit into 8K limit from HTTP server
# you have to take in account: