/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/xml.py

Fix syntax of serializer_v5.pack_revision_to_string

*_to_string functions should return strings with a trailing newline.

Add tests for this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        self._write_element(elt, f)
47
47
 
48
48
    def write_inventory_to_string(self, inv):
49
 
        return tostring(self._pack_inventory(inv))
 
49
        return tostring(self._pack_inventory(inv)) + '\n'
50
50
 
51
51
    def read_inventory_from_string(self, xml_string):
52
52
        return self._unpack_inventory(fromstring(xml_string))
58
58
        self._write_element(self._pack_revision(rev), f)
59
59
 
60
60
    def write_revision_to_string(self, rev):
61
 
        return tostring(self._pack_revision(rev), f)
 
61
        return tostring(self._pack_revision(rev)) + '\n'
62
62
 
63
63
    def read_revision(self, f):
64
64
        return self._unpack_revision(self._read_element(f))