734
def iter_files_bytes(self, desired_files):
735
"""Iterate through file versions.
737
Files will not necessarily be returned in the order they occur in
738
desired_files. No specific order is guaranteed.
740
Yields pairs of identifier, bytes_iterator. identifier is an opaque
741
value supplied by the caller as part of desired_files. It should
742
uniquely identify the file version in the caller's context. (Examples:
743
an index number or a TreeTransform trans_id.)
745
bytes_iterator is an iterable of bytestrings for the file. The
746
kind of iterable and length of the bytestrings are unspecified, but for
747
this implementation, it is a list of lines produced by
748
VersionedFile.get_lines().
750
:param desired_files: a list of (file_id, revision_id, identifier)
753
transaction = self.get_transaction()
754
for file_id, revision_id, callable_data in desired_files:
756
weave = self.weave_store.get_weave(file_id, transaction)
757
except errors.NoSuchFile:
758
raise errors.NoSuchIdInRepository(self, file_id)
759
yield callable_data, weave.get_lines(revision_id)
734
761
def item_keys_introduced_by(self, revision_ids, _files_pb=None):
735
762
"""Get an iterable listing the keys of all the data introduced by a set