~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml_serializer.py

  • Committer: Aaron Bentley
  • Date: 2007-12-25 04:17:50 UTC
  • mto: This revision was merged to the branch mainline in revision 3160.
  • Revision ID: aaron.bentley@utoronto.ca-20071225041750-t6chr3pmgnebvqcz
Handle non-directory parent conflicts (abentley, #177390)

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.ElementTree
 
37
        import 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. 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).
 
68
            revision.
73
69
        """
74
70
        try:
75
71
            return self._unpack_inventory(fromstring(xml_string), revision_id)
179
175
format_registry.register_lazy('5', 'bzrlib.xml5', 'serializer_v5')
180
176
format_registry.register_lazy('6', 'bzrlib.xml6', 'serializer_v6')
181
177
format_registry.register_lazy('7', 'bzrlib.xml7', 'serializer_v7')
182
 
format_registry.register_lazy('8', 'bzrlib.xml8', 'serializer_v8')