18
18
Various useful commands for working with bzr.
21
from bzrlib import ignores, option
22
from bzrlib.commands import (
23
builtin_command_names,
21
from bzrlib import ignores
22
from bzrlib.commands import plugin_cmds
26
23
from version import version_info, __version__
55
52
plugin_cmds.register_lazy(cmd_name, aliases,
56
53
'bzrlib.plugins.bzrtools.command_classes')
58
list_branches_aliases = (['branches'] if 'branches' not in
59
builtin_command_names() else [])
61
plugin_cmds.register_lazy('cmd_list_branches', list_branches_aliases,
62
'bzrlib.plugins.bzrtools.command_classes')
64
55
plugin_cmds.register_lazy('cmd_heads', [], 'bzrlib.plugins.bzrtools.heads')
67
option.diff_writer_registry.register_lazy(
68
'auto-color', 'bzrlib.plugins.bzrtools.colordiff', 'auto_diff_writer',
69
'Colorized diffs, if supported',
71
option.diff_writer_registry.register_lazy(
72
'color', 'bzrlib.plugins.bzrtools.colordiff', 'DiffWriter',
75
option.diff_writer_registry.default_key = 'auto-color'
79
58
from bzrlib.tests.TestUtil import TestLoader
81
60
from doctest import DocTestSuite, ELLIPSIS
82
61
from unittest import TestSuite
63
import tests.clean_tree
84
64
import tests.test_dotgraph
85
66
import tests.test_cbranch
86
import tests.test_conflict_diff
87
from bzrlib.plugins.bzrtools.tests import test_fetch_ghosts
88
import tests.test_graph
89
67
import tests.test_link_tree
90
68
import tests.test_patch
91
import tests.test_mirror
69
import tests.test_rspush
92
70
import tests.upstream_import
94
72
import tests.blackbox
95
73
import tests.shelf_tests
96
74
result = TestSuite()
97
75
result.addTest(DocTestSuite(bzrtools, optionflags=ELLIPSIS))
76
result.addTest(tests.clean_tree.test_suite())
98
77
result.addTest(tests.test_suite())
99
78
result.addTest(TestLoader().loadTestsFromModule(tests.shelf_tests))
100
79
result.addTest(tests.blackbox.test_suite())
101
result.addTest(TestLoader().loadTestsFromModule(tests.upstream_import))
80
result.addTest(tests.upstream_import.test_suite())
102
81
result.addTest(zap.test_suite())
103
82
result.addTest(TestLoader().loadTestsFromModule(tests.test_dotgraph))
104
result.addTest(TestLoader().loadTestsFromModule(test_fetch_ghosts))
105
result.addTest(TestLoader().loadTestsFromModule(tests.test_graph))
83
result.addTest(TestLoader().loadTestsFromModule(tests.is_clean))
106
84
result.addTest(TestLoader().loadTestsFromModule(tests.test_link_tree))
107
85
result.addTest(TestLoader().loadTestsFromModule(tests.test_patch))
86
result.addTest(TestLoader().loadTestsFromModule(tests.test_rspush))
108
87
result.addTest(TestLoader().loadTestsFromModule(tests.test_cbranch))
109
result.addTest(TestLoader().loadTestsFromModule(tests.test_conflict_diff))
110
result.addTest(TestLoader().loadTestsFromModule(tests.test_mirror))