/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-06-11 10:00:59 UTC
  • mfrom: (1761.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060611100059-af22251835302b32
(robertc)Bugfix #49224 - treat xml as utf8 not ascii streams.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1218
1218
                    new_revision, xml)
1219
1219
                inv.revision_id = new_revision
1220
1220
                xml = bzrlib.xml5.serializer_v5.write_inventory_to_string(inv)
1221
 
 
 
1221
            assert isinstance(xml, str), 'serialised xml must be bytestring.'
1222
1222
            path = self._basis_inventory_name()
1223
 
            self._control_files.put_utf8(path, xml)
 
1223
            sio = StringIO(xml)
 
1224
            self._control_files.put(path, sio)
1224
1225
        except WeaveRevisionNotPresent:
1225
1226
            pass
1226
1227
 
1227
1228
    def read_basis_inventory(self):
1228
1229
        """Read the cached basis inventory."""
1229
1230
        path = self._basis_inventory_name()
1230
 
        return self._control_files.get_utf8(path).read()
 
1231
        return self._control_files.get(path).read()
1231
1232
        
1232
1233
    @needs_read_lock
1233
1234
    def read_working_inventory(self):