22
22
DEFAULT_IGNORE.append('./.bzr-shelf*')
25
Option.OPTIONS['ignored'] = Option('ignored',
26
help='delete all ignored files.')
27
Option.OPTIONS['detritus'] = Option('detritus',
28
help='delete conflict files merge backups, and failed selftest dirs.' +
29
'(*.THIS, *.BASE, *.OTHER, *~, *.tmp')
30
Option.OPTIONS['dry-run'] = Option('dry-run',
31
help='show files to delete instead of deleting them.')
33
25
class cmd_clean_tree(bzrlib.commands.Command):
34
26
"""Remove unwanted files from working tree. <BZRTOOLS>
35
27
Normally, ignored files are left alone.
37
takes_options = ['ignored', 'detritus', 'dry-run']
29
takes_options = [Option('ignored', help='delete all ignored files.'),
30
Option('detritus', help='delete conflict files merge'
31
' backups, and failed selftest dirs. (*.THIS, '
32
'*.BASE, *.OTHER, *~, *.tmp)'),
33
Option('dry-run', help='show files to delete instead of'
38
35
def run(self, ignored=False, detritus=False, dry_run=False):
39
36
from clean_tree import clean_tree
40
37
clean_tree('.', ignored=ignored, detritus=detritus, dry_run=dry_run)
42
Option.OPTIONS['merge-branch'] = Option('merge-branch',type=str)
44
39
class cmd_graph_ancestry(bzrlib.commands.Command):
45
40
"""Produce ancestry graphs using dot. <BZRTOOLS>
107
102
strip_help="""Strip the smallest prefix containing num leading slashes from \
108
103
each file name found in the patch file."""
109
Option.OPTIONS['strip'] = Option('strip', type=int, help=strip_help)
110
104
Option.OPTIONS['bzrdiff'] = Option('bzrdiff',type=None,
111
105
help="""Handle extra bzr tags""")
112
106
class cmd_patch(bzrlib.commands.Command):
113
107
"""Apply a named patch to the current tree. <BZRTOOLS>
115
109
takes_args = ['filename?']
116
takes_options = ['strip']
110
takes_options = [Option('strip', type=int, help=strip_help)]
117
111
def run(self, filename=None, strip=-1, bzrdiff=0):
118
112
from patch import patch
119
113
from bzrlib.workingtree import WorkingTree