~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml7.py

  • Committer: Martin Packman
  • Date: 2012-02-01 13:24:42 UTC
  • mto: (6437.23.4 2.5)
  • mto: This revision was merged to the branch mainline in revision 6462.
  • Revision ID: martin.packman@canonical.com-20120201132442-ela7jc4mxv4b058o
Treat path for .bzr.log as unicode

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    supported_kinds = set(['file', 'directory', 'symlink', 'tree-reference'])
31
31
    format_num = '7'
32
32
 
 
33
    def _unpack_entry(self, elt, entry_cache=None, return_from_cache=False):
 
34
        kind = elt.tag
 
35
        if not kind in self.supported_kinds:
 
36
            raise AssertionError('unsupported entry kind %s' % kind)
 
37
        if kind == 'tree-reference':
 
38
            file_id = elt.attrib['file_id']
 
39
            name = elt.attrib['name']
 
40
            parent_id = elt.attrib['parent_id']
 
41
            revision = elt.get('revision')
 
42
            reference_revision = elt.get('reference_revision')
 
43
            return inventory.TreeReference(file_id, name, parent_id, revision,
 
44
                                           reference_revision)
 
45
        else:
 
46
            return xml6.Serializer_v6._unpack_entry(self, elt,
 
47
                entry_cache=entry_cache, return_from_cache=return_from_cache)
33
48
 
34
49
serializer_v7 = Serializer_v7()