~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-12 11:41:41 UTC
  • mto: This revision was merged to the branch mainline in revision 6361.
  • Revision ID: jelmer@samba.org-20111212114141-k0bkxqaz28lb1b0y
Move core inventory code to xml_serializer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    format_num = '5'
31
31
    root_id = inventory.ROOT_ID
32
32
 
 
33
    def _unpack_entry(self, elt, entry_cache=None, return_from_cache=False):
 
34
        # This is here because it's overridden by xml7
 
35
        return xml_serializer.unpack_inventory_entry(elt, entry_cache,
 
36
                return_from_cache)
 
37
 
33
38
    def _unpack_inventory(self, elt, revision_id, entry_cache=None,
34
39
                          return_from_cache=False):
35
40
        """Construct from XML Element
52
57
        #   avoiding attributes     2.46s
53
58
        #   adding assertions       2.50s
54
59
        #   last_parent cache       2.52s (worse, removed)
55
 
        unpack_entry = xml_serializer.unpack_xml_inventory_entry
 
60
        unpack_entry = self._unpack_entry
56
61
        byid = inv._byid
57
62
        for e in elt:
58
63
            ie = unpack_entry(e, entry_cache=entry_cache,