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 |
|
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 |
|
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