~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml_serializer.py

  • Committer: John Arbash Meinel
  • Author(s): Mark Hammond
  • Date: 2008-09-09 17:02:21 UTC
  • mto: This revision was merged to the branch mainline in revision 3697.
  • Revision ID: john@arbash-meinel.com-20080909170221-svim3jw2mrz0amp3
An updated transparent icon for bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    except ImportError:
35
35
        from cElementTree import (ElementTree, SubElement, Element,
36
36
                                  XMLTreeBuilder, fromstring, tostring)
37
 
        import elementtree
 
37
        import elementtree.ElementTree
38
38
    ParseError = SyntaxError
39
39
except ImportError:
40
40
    mutter('WARNING: using slower ElementTree; consider installing cElementTree'
65
65
        :param xml_string: The xml to read.
66
66
        :param revision_id: If not-None, the expected revision id of the
67
67
            inventory. Some serialisers use this to set the results' root
68
 
            revision.
 
68
            revision. This should be supplied for deserialising all
 
69
            from-repository inventories so that xml5 inventories that were
 
70
            serialised without a revision identifier can be given the right
 
71
            revision id (but not for working tree inventories where users can
 
72
            edit the data without triggering checksum errors or anything).
69
73
        """
70
74
        try:
71
75
            return self._unpack_inventory(fromstring(xml_string), revision_id)
175
179
format_registry.register_lazy('5', 'bzrlib.xml5', 'serializer_v5')
176
180
format_registry.register_lazy('6', 'bzrlib.xml6', 'serializer_v6')
177
181
format_registry.register_lazy('7', 'bzrlib.xml7', 'serializer_v7')
 
182
format_registry.register_lazy('8', 'bzrlib.xml8', 'serializer_v8')