~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: Robert Collins
  • Date: 2005-10-03 15:19:25 UTC
  • mto: (1393.1.30)
  • mto: This revision was merged to the branch mainline in revision 1400.
  • Revision ID: robertc@robertcollins.net-20051003151925-19df6a9a5e9dc42a
remove kind from the InventoryEntry constructor - only child classes should be created now

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
                ie.executable = True
140
140
            v = elt.get('text_size')
141
141
            ie.text_size = v and int(v)
 
142
        elif kind == 'symlink':
 
143
            ie = inventory.InventoryLink(elt.get('file_id'),
 
144
                                         elt.get('name'),
 
145
                                         parent_id)
 
146
            ie.symlink_target = elt.get('symlink_target')
142
147
        else:
143
 
            ie = InventoryEntry(elt.get('file_id'),
144
 
                                elt.get('name'),
145
 
                                kind,
146
 
                                parent_id)
147
 
            ie.symlink_target = elt.get('symlink_target')
 
148
            raise BzrError("unknown kind %r" % kind)
148
149
        ie.revision = elt.get('revision')
149
150
 
150
151
        return ie