794
794
This makes bzr stop tracking changes to a versioned file. It does
795
795
not delete the working copy.
797
You can specify one or more files, and/or --new. If you specify --new,
798
only 'added' files will be removed. If you specify both, then new files
799
in the specified directories will be removed. If the directories are
800
also new, they will also be removed.
797
takes_args = ['file+']
798
takes_options = ['verbose']
802
takes_args = ['file*']
803
takes_options = ['verbose', Option('new', help='remove newly-added files')]
801
def run(self, file_list, verbose=False):
806
def run(self, file_list, verbose=False, new=False):
802
807
tree, file_list = tree_files(file_list)
809
if file_list is None:
810
raise BzrCommandError('Specify one or more files to remove, or'
813
from bzrlib.delta import compare_trees
814
added = [compare_trees(tree.basis_tree(), tree,
815
specific_files=file_list).added]
816
file_list = sorted([f[0] for f in added[0]], reverse=True)
817
if len(file_list) == 0:
818
raise BzrCommandError('No matching files.')
803
819
tree.remove(file_list, verbose=verbose)