~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: Robert Collins
  • Date: 2006-06-09 09:18:56 UTC
  • mfrom: (1725.2.9 commit)
  • mto: This revision was merged to the branch mainline in revision 1757.
  • Revision ID: robertc@robertcollins.net-20060609091856-2f9fc48998d655a9
(robertc, ab)Merge some commit and fetch tuning steps.

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',