~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml4.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-11-17 03:20:35 UTC
  • mfrom: (4792.4.3 456036)
  • Revision ID: pqm@pqm.ubuntu.com-20091117032035-s3sgtlixj1lrminn
(Gordon Tyler) Fix IndexError during 'bzr ignore /' (#456036)

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.