/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Robert Collins
  • Date: 2006-09-08 00:19:48 UTC
  • mfrom: (1992 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1993.
  • Revision ID: robertc@robertcollins.net-20060908001948-87b1b268cec30ede
Merge bzr.dev and undeprecated WorkingTree.last_revision as per review feedback.

Show diffs side-by-side

added added

removed removed

Lines of Context:
468
468
        """
469
469
        specific = self.specific_files
470
470
        deleted_ids = []
 
471
        deleted_paths = set()
471
472
        for path, ie in self.work_inv.iter_entries():
 
473
            if is_inside_any(deleted_paths, path):
 
474
                # The tree will delete the required ids recursively.
 
475
                continue
472
476
            if specific and not is_inside_any(specific, path):
473
477
                continue
474
478
            if not self.work_tree.has_filename(path):
 
479
                deleted_paths.add(path)
475
480
                self.reporter.missing(path)
476
 
                deleted_ids.append((path, ie.file_id))
477
 
        if deleted_ids:
478
 
            deleted_ids.sort(reverse=True)
479
 
            for path, file_id in deleted_ids:
480
 
                del self.work_inv[file_id]
481
 
            self.work_tree._write_inventory(self.work_inv)
 
481
                deleted_ids.append(ie.file_id)
 
482
        self.work_tree.unversion(deleted_ids)
482
483
 
483
484
    def _populate_new_inv(self):
484
485
        """Build revision inventory.