~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml4.py

  • Committer: Andrew Bennetts
  • Date: 2010-02-12 04:33:05 UTC
  • mfrom: (5031 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5032.
  • Revision ID: andrew.bennetts@canonical.com-20100212043305-ujdbsdoviql2t7i3
Merge lp:bzr

Show diffs side-by-side

added added

removed removed

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