~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml.py

  • Committer: abentley
  • Date: 2005-10-14 03:50:50 UTC
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1460.
  • Revision ID: abentley@lappy-20051014035050-d779472ccb599a51
semi-broke merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/env python
1
2
# -*- coding: UTF-8 -*-
2
3
 
3
4
# This program is free software; you can redistribute it and/or modify
45
46
        self._write_element(elt, f)
46
47
 
47
48
    def write_inventory_to_string(self, inv):
48
 
        return tostring(self._pack_inventory(inv)) + '\n'
 
49
        return tostring(self._pack_inventory(inv))
49
50
 
50
51
    def read_inventory_from_string(self, xml_string):
51
52
        return self._unpack_inventory(fromstring(xml_string))
57
58
        self._write_element(self._pack_revision(rev), f)
58
59
 
59
60
    def write_revision_to_string(self, rev):
60
 
        return tostring(self._pack_revision(rev)) + '\n'
 
61
        return tostring(self._pack_revision(rev), f)
61
62
 
62
63
    def read_revision(self, f):
63
64
        return self._unpack_revision(self._read_element(f))