1355
1355
:return: the offset in the data file raw_data was written.
1357
1357
assert isinstance(raw_data, str), 'data must be plain bytes'
1360
1360
def add_record(self, version_id, digest, lines):
1361
1361
"""Write new text record to disk. Returns the position in the
1362
1362
file where it was written."""
1363
1363
size, sio = self._record_to_data(version_id, digest, lines)
1367
1367
self._cache[version_id] = sio.getvalue()