~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Robert Collins
  • Date: 2007-07-02 22:46:20 UTC
  • mto: This revision was merged to the branch mainline in revision 2581.
  • Revision ID: robertc@robertcollins.net-20070702224620-rptec516zwv3opwn
Fix WorkingTree(3).add to not reset the entire inventory but modify the existing one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
615
615
        # should probably put it back with the previous ID.
616
616
        # the read and write working inventory should not occur in this 
617
617
        # function - they should be part of lock_write and unlock.
618
 
        inv = self.read_working_inventory()
 
618
        inv = self.inventory
619
619
        for f, file_id, kind in zip(files, ids, kinds):
620
620
            assert kind is not None
621
621
            if file_id is None:
623
623
            else:
624
624
                file_id = osutils.safe_file_id(file_id)
625
625
                inv.add_path(f, kind=kind, file_id=file_id)
626
 
        self._write_inventory(inv)
 
626
            self._inventory_is_modified = True
627
627
 
628
628
    @needs_tree_write_lock
629
629
    def _gather_kinds(self, files, kinds):