~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: Martin Pool
  • Date: 2006-06-20 03:30:14 UTC
  • mfrom: (1793 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1797.
  • Revision ID: mbp@sourcefrog.net-20060620033014-e19ce470e2ce6561
[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
            e.append(self._pack_entry(ie))
42
42
        return e
43
43
 
44
 
 
45
44
    def _pack_entry(self, ie):
46
45
        """Convert InventoryEntry to XML element"""
47
46
        # TODO: should just be a plain assertion
68
67
        if ie.parent_id != ROOT_ID:
69
68
            assert isinstance(ie.parent_id, basestring)
70
69
            e.set('parent_id', ie.parent_id)
71
 
 
72
70
        e.tail = '\n'
73
 
 
74
71
        return e
75
72
 
76
 
 
77
73
    def _pack_revision(self, rev):
78
74
        """Revision object -> xml tree"""
79
75
        root = Element('revision',