~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/serializer/v4.py

  • Committer: Aaron Bentley
  • Date: 2007-06-29 01:08:23 UTC
  • mto: (2520.5.2 bzr.mpbundle)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: aaron.bentley@utoronto.ca-20070629010823-pmkbnl4yyakzd3ts
Update for new pack interface

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
            fileobj.readline()
103
103
        self.patch_lines = []
104
104
        self._container = pack.ContainerReader(
105
 
            StringIO(fileobj.read().decode('bz2')).read)
106
 
#            Have to use StringIO for perf, until ContainerReader fixed.
107
 
#            iterablefile.IterableFile(self.iter_decode(fileobj)).read)
 
105
            iterablefile.IterableFile(self.iter_decode(fileobj)))
108
106
 
109
107
    @staticmethod
110
108
    def iter_decode(fileobj):
111
109
        decompressor = bz2.BZ2Decompressor()
112
110
        for line in fileobj:
113
 
            yield decompressor.decompress()
 
111
            yield decompressor.decompress(line)
114
112
 
115
113
    @staticmethod
116
114
    def decode_name(name):