992
992
nostore_sha=nostore_sha))[0]
993
993
return sha1, length, None
995
def add_text(self, key, parents, text, parent_texts=None,
996
nostore_sha=None, random_id=False,
998
"""See VersionedFiles.add_text()."""
999
self._index._check_write_ok()
1000
self._check_add(key, None, random_id, check_content=False)
1001
if text.__class__ is not str:
1002
raise errors.BzrBadParameterUnicode("text")
1004
# The caller might pass None if there is no graph data, but kndx
1005
# indexes can't directly store that, so we give them
1006
# an empty tuple instead.
1008
# double handling for now. Make it work until then.
1010
record = FulltextContentFactory(key, parents, None, text)
1011
sha1 = list(self._insert_record_stream([record], random_id=random_id,
1012
nostore_sha=nostore_sha))[0]
1013
return sha1, length, None
995
1015
def add_fallback_versioned_files(self, a_versioned_files):
996
1016
"""Add a source of texts for texts not present in this knit.