~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml4.py

  • Committer: John Arbash Meinel
  • Date: 2009-11-07 00:28:26 UTC
  • mto: This revision was merged to the branch mainline in revision 4842.
  • Revision ID: john@arbash-meinel.com-20091107002826-umvwb3zl0yajo6rc
Use StaticTuple as part of the builder process.

Also use it in the pure python btree parser, mostly for consistency.

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