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