~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

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