13
13
bzrlib.commands.OPTIONS['ignored'] = None
14
bzrlib.commands.OPTIONS['detrius'] = None
15
16
class cmd_clean_tree(bzrlib.commands.Command):
16
17
"""Remove unwanted files from working tree.
17
Normally, ignored files are left alone. The --ignored flag will cause them
18
to be deleted as well.
18
Normally, ignored files are left alone.
21
--detrius Delete conflict files and merge backups. (*.THIS, *.BASE,
23
--ignored Delete all ignored files.
24
--dry-run Show files to delete instead of deleting them.
20
takes_options = ['ignored']
21
def run(self, ignored=False):
26
takes_options = ['ignored', 'detrius', 'dry-run']
27
def run(self, ignored=False, detrius=False, dry_run=False):
23
clean_tree.clean_tree(ignored=ignored)
29
from bzrlib.branch import Branch
30
br = Branch.open_containing('.')
31
tree = br.working_tree()
32
deletables = clean_tree.iter_deletables(tree, ignored=ignored,
34
clean_tree.clean_tree(deletables, dry_run=dry_run)
25
36
bzrlib.commands.OPTIONS['no-collapse'] = None
26
37
bzrlib.commands.OPTIONS['no-antialias'] = None
96
commands = [push.cmd_push, annotate.cmd_annotate, shelf.cmd_shelve,
107
commands = [push.cmd_push, shelf.cmd_shelve,
97
108
shelf.cmd_unshelve, cmd_clean_tree, cmd_graph_ancestry,
98
109
cmd_fetch_ghosts, cmd_patch]
111
import bzrlib.builtins
112
if not hasattr(bzrlib.builtins, "cmd_annotate"):
113
commands.append(annotate.cmd_annotate)
99
115
from errors import NoPyBaz
101
117
import baz_import