~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml4.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:
108
108
            ie.text_sha1 = elt.get('text_sha1')
109
109
            v = elt.get('text_size')
110
110
            ie.text_size = v and int(v)
 
111
        elif kind == 'symlink':
 
112
            ie = inventory.InventoryLink(elt.get('file_id'),
 
113
                                         elt.get('name'),
 
114
                                         parent_id)
 
115
            ie.symlink_target = elt.get('symlink_target')
111
116
        else:
112
 
            ie = InventoryEntry(elt.get('file_id'),
113
 
                                elt.get('name'),
114
 
                                elt.get('kind'),
115
 
                                parent_id)
116
 
            ie.symlink_target = elt.get('symlink_target')
 
117
            raise BzrError("unknown kind %r" % kind)
117
118
 
118
119
        ## mutter("read inventoryentry: %r" % (elt.attrib))
119
120