~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisiontree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-25 19:27:30 UTC
  • mfrom: (4202.1.1 iter_files_bytes_chunked)
  • Revision ID: pqm@pqm.ubuntu.com-20090325192730-yt4por4rlu0x7gvi
(jam) Change Repository.iter_files_bytes() to return chunked strings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        return self._revision_id
65
65
 
66
66
    def get_file_text(self, file_id, path=None):
67
 
        return list(self.iter_files_bytes([(file_id, None)]))[0][1]
 
67
        _, content = list(self.iter_files_bytes([(file_id, None)]))[0]
 
68
        return ''.join(content)
68
69
 
69
70
    def get_file(self, file_id, path=None):
70
71
        return StringIO(self.get_file_text(file_id))