##// END OF EJS Templates
obsolete: make encodemarkers a public function...
Pierre-Yves David -
r22335:7c4c19df default
parent child Browse files
Show More
@@ -147,7 +147,7 b' def _readmarkers(data):'
147 % diskversion)
147 % diskversion)
148 return diskversion, formats[diskversion][0](data, off)
148 return diskversion, formats[diskversion][0](data, off)
149
149
150 def _encodemarkers(markers, addheader=False, version=_fm0version):
150 def encodemarkers(markers, addheader=False, version=_fm0version):
151 # Kept separate from flushmarkers(), it will be reused for
151 # Kept separate from flushmarkers(), it will be reused for
152 # markers exchange.
152 # markers exchange.
153 encodeone = formats[version][1]
153 encodeone = formats[version][1]
@@ -391,7 +391,7 b' class obsstore(object):'
391 offset = f.tell()
391 offset = f.tell()
392 transaction.add('obsstore', offset)
392 transaction.add('obsstore', offset)
393 # offset == 0: new file - add the version header
393 # offset == 0: new file - add the version header
394 for bytes in _encodemarkers(new, offset == 0, self._version):
394 for bytes in encodemarkers(new, offset == 0, self._version):
395 f.write(bytes)
395 f.write(bytes)
396 finally:
396 finally:
397 # XXX: f.close() == filecache invalidation == obsstore rebuilt.
397 # XXX: f.close() == filecache invalidation == obsstore rebuilt.
General Comments 0
You need to be logged in to leave comments. Login now