~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.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:
661
661
            name = os.path.basename(path)
662
662
            if name == "":
663
663
                continue
 
664
            # fixme, there should be a factory function inv,add_?? 
664
665
            if kind == 'directory':
665
666
                inv.add(inventory.InventoryDirectory(file_id, name, parent))
666
667
            elif kind == 'file':
667
668
                inv.add(inventory.InventoryFile(file_id, name, parent))
 
669
            elif kind == 'symlink':
 
670
                inv.add(inventory.InventoryLink(file_id, name, parent))
668
671
            else:
669
 
                inv.add(InventoryEntry(file_id, name, kind, parent))
 
672
                raise BzrError("unknown kind %r" % kind)
670
673
        self._write_inventory(inv)
671
674
 
672
675
    def unknowns(self):