~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-08-27 05:06:27 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20050827050627-b1d857fa4d986f91
Added resolve command

Show diffs side-by-side

added added

removed removed

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