~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml4.py

  • Committer: Mark Hammond
  • Date: 2008-12-28 05:21:23 UTC
  • mfrom: (3920 +trunk)
  • mto: (3932.1.1 prepare-1.11)
  • mto: This revision was merged to the branch mainline in revision 3937.
  • Revision ID: mhammond@skippinet.com.au-20081228052123-f78xs5sbdkotshwf
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        return e
58
58
 
59
59
 
60
 
    def _unpack_inventory(self, elt, revision_id=None):
 
60
    def _unpack_inventory(self, elt, revision_id=None, entry_cache=None):
61
61
        """Construct from XML Element
62
62
 
63
63
        :param revision_id: Ignored parameter used by xml5.
65
65
        root_id = elt.get('file_id') or ROOT_ID
66
66
        inv = Inventory(root_id)
67
67
        for e in elt:
68
 
            ie = self._unpack_entry(e)
 
68
            ie = self._unpack_entry(e, entry_cache=entry_cache)
69
69
            if ie.parent_id == ROOT_ID:
70
70
                ie.parent_id = root_id
71
71
            inv.add(ie)
72
72
        return inv
73
73
 
74
74
 
75
 
    def _unpack_entry(self, elt):
 
75
    def _unpack_entry(self, elt, entry_cache=None):
76
76
        ## original format inventories don't have a parent_id for
77
77
        ## nodes in the root directory, but it's cleaner to use one
78
78
        ## internally.