~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml_serializer.py

  • Committer: Vincent Ladeuil
  • Date: 2012-02-24 12:15:02 UTC
  • mto: (6437.23.15 2.5)
  • mto: This revision was merged to the branch mainline in revision 6475.
  • Revision ID: v.ladeuil+lp@free.fr-20120224121502-zd0v1gxfe4kvezm3
Open 2.5.1 for bugfixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    import xml.etree.cElementTree as elementtree
31
31
    ParseError = getattr(elementtree, "ParseError", SyntaxError)
32
32
except ImportError:
33
 
    # Fall back to pure python implementation if C extension is unavailable
 
33
    # Fall back to pure python implementation if C extention is unavailable
34
34
    import xml.etree.ElementTree as elementtree
35
35
    try:
36
36
        from xml.etree.ElementTree import ParseError
309
309
                                     elt_get('name'),
310
310
                                     parent_id)
311
311
        ie.symlink_target = elt_get('symlink_target')
312
 
    elif kind == 'tree-reference':
313
 
        file_id = elt.attrib['file_id']
314
 
        name = elt.attrib['name']
315
 
        parent_id = elt.attrib['parent_id']
316
 
        revision = elt.get('revision')
317
 
        reference_revision = elt.get('reference_revision')
318
 
        ie = inventory.TreeReference(file_id, name, parent_id, revision,
319
 
                                       reference_revision)
320
312
    else:
321
313
        raise errors.UnsupportedInventoryKind(kind)
322
314
    ie.revision = revision