~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2006-05-25 04:34:39 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20060525043439-e4b2654d2c895086
Stop adding global options

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
DEFAULT_IGNORE.append('./.bzr-shelf*')
23
23
 
24
24
 
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.')
32
 
 
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.
36
28
    """
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'
 
34
                            ' deleting them.')]
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)
41
38
 
42
 
Option.OPTIONS['merge-branch'] = Option('merge-branch',type=str)
43
 
 
44
39
class cmd_graph_ancestry(bzrlib.commands.Command):
45
40
    """Produce ancestry graphs using dot.  <BZRTOOLS>
46
41
    
106
101
 
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>
114
108
    """
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