~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2006-06-18 02:57:01 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20060618025701-0aeb369dff5c6c22
Implement cdiff (based on old Fai code)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
"""\
3
3
Various useful plugins for working with bzr.
4
4
"""
5
 
import bzrlib.commands
6
5
import rspush
7
6
from errors import CommandError
8
7
from patchsource import BzrPatchSource
10
9
from switch import cmd_switch
11
10
import sys
12
11
import os.path
13
 
from bzrlib.option import Option
 
12
 
 
13
from bzrlib import DEFAULT_IGNORE
 
14
import bzrlib.builtins
14
15
import bzrlib.branch
 
16
import bzrlib.commands
15
17
from bzrlib.errors import BzrCommandError
 
18
from bzrlib.help import command_usage
 
19
from bzrlib.option import Option
16
20
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), 
17
21
                                                 "external")))
18
 
from bzrlib import DEFAULT_IGNORE
19
 
from bzrlib.help import command_usage
20
22
 
21
23
 
22
24
DEFAULT_IGNORE.append('./.shelf')
468
470
        from shove import do_shove
469
471
        do_shove(source, target)
470
472
 
 
473
class cmd_cdiff(bzrlib.commands.Command):
 
474
    """A color version of bzr's diff <BZRTOOLS>"""
 
475
    takes_args = bzrlib.builtins.cmd_diff.takes_args
 
476
    takes_options = bzrlib.builtins.cmd_diff.takes_options
 
477
    def run(*args, **kwargs):
 
478
        from colordiff import colordiff
 
479
        colordiff(*args, **kwargs)
471
480
 
472
481
commands = [cmd_shelve, cmd_unshelve, cmd_shelf, cmd_clean_tree,
473
482
            cmd_graph_ancestry, cmd_fetch_ghosts, cmd_patch, cmd_shell,
474
483
            cmd_branch_history, cmd_zap, cmd_cbranch, cmd_branches, 
475
 
            cmd_multi_pull, cmd_switch, cmd_branch_mark, cmd_import, cmd_shove]
476
 
 
477
 
 
478
 
import bzrlib.builtins
 
484
            cmd_multi_pull, cmd_switch, cmd_branch_mark, cmd_import, cmd_shove,
 
485
            cmd_cdiff]
 
486
 
 
487
 
479
488
commands.append(rspush.cmd_rspush)
480
489
 
481
490
from errors import NoPyBaz