~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2005-08-30 15:17:44 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050830151743-8d5682ae5ce96b6b
home dir path

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""\
 
2
Various useful plugins for working with bzr.
 
3
"""
 
4
import bzrlib.commands
 
5
import push
 
6
import annotate
 
7
import shelf
 
8
import conflicts
 
9
 
 
10
bzrlib.commands.OPTIONS['ignored'] = None
 
11
 
 
12
class cmd_clean_tree(bzrlib.commands.Command):
 
13
    """Remove unwanted files from working tree.
 
14
    Normally, ignored files are left alone.  The --ignored flag will cause them
 
15
    to be deleted as well.
 
16
    """
 
17
    takes_options = ['ignored']
 
18
    def run(self, ignored=False):
 
19
        import clean_tree
 
20
        clean_tree.clean_tree(ignored=ignored)
 
21
 
 
22
class cmd_conflicted(bzrlib.commands.Command):
 
23
    """List files that have conflicts
 
24
    """
 
25
    takes_options = ['ignored']
 
26
    def run(self, ignored=False):
 
27
        import clean_tree
 
28
        clean_tree.clean_tree(ignored=ignored)
 
29
 
 
30
commands = [push.cmd_push, annotate.cmd_annotate, shelf.cmd_shelve, 
 
31
            shelf.cmd_unshelve, cmd_clean_tree, conflicts.cmd_conflicts,
 
32
            conflicts.cmd_resolve]
 
33
from errors import NoPyBaz
 
34
try:
 
35
    import baz_import
 
36
    commands.append(baz_import.cmd_baz_import)
 
37
 
 
38
except NoPyBaz:
 
39
    class cmd_baz_import(bzrlib.commands.Command):
 
40
        """Disabled. (Requires PyBaz)"""
 
41
    commands.append(cmd_baz_import)
 
42
 
 
43
if hasattr(bzrlib.commands, 'register_command'):
 
44
    for command in commands:
 
45
        bzrlib.commands.register_command(command)