~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Aaron Bentley
  • Date: 2007-05-24 15:01:09 UTC
  • mto: (1551.19.24 Aaron's mergeable stuff)
  • mto: This revision was merged to the branch mainline in revision 2506.
  • Revision ID: abentley@panoramicfeedback.com-20070524150109-is07n3xarwa63736
Stop using inventory directly in WorkingTree.remove

Show diffs side-by-side

added added

removed removed

Lines of Context:
1775
1775
        if isinstance(files, basestring):
1776
1776
            files = [files]
1777
1777
 
1778
 
        inv = self.inventory
 
1778
        inv_delta = []
1779
1779
 
1780
1780
        new_files=set()
1781
1781
        unknown_files_in_directory=set()
1820
1820
 
1821
1821
        # do this before any modifications
1822
1822
        for f in files:
1823
 
            fid = inv.path2id(f)
 
1823
            fid = self.path2id(f)
1824
1824
            message=None
1825
1825
            if not fid:
1826
1826
                message="%s is not versioned." % (f,)
1831
1831
                        new_status = 'I'
1832
1832
                    else:
1833
1833
                        new_status = '?'
1834
 
                    textui.show_status(new_status, inv[fid].kind, f,
 
1834
                    textui.show_status(new_status, self.kind(fid), f,
1835
1835
                                       to_file=to_file)
1836
1836
                # unversion file
1837
 
                del inv[fid]
 
1837
                inv_delta.append((f, None, fid, None))
1838
1838
                message="removed %s" % (f,)
1839
1839
 
1840
1840
            if not keep_files:
1854
1854
            # print only one message (if any) per file.
1855
1855
            if message is not None:
1856
1856
                note(message)
1857
 
        self._write_inventory(inv)
 
1857
        self.apply_inventory_delta(inv_delta)
1858
1858
 
1859
1859
    @needs_tree_write_lock
1860
1860
    def revert(self, filenames, old_tree=None, backups=True,