1
# Copyright (C) 2008 Aaron Bentley.
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
Various useful commands for working with bzr.
21
from bzrlib import ignores, option
22
from bzrlib.commands import (
23
builtin_command_names,
26
from version import version_info, __version__
29
ignores.add_runtime_ignores(['./.shelf'])
33
'cmd_branch_history': [],
36
'cmd_conflict_diff': [],
37
'cmd_create_mirror': [],
38
'cmd_fetch_ghosts': ['fetch-missing'],
39
'cmd_graph_ancestry': [],
54
for cmd_name, aliases in commands.items():
55
plugin_cmds.register_lazy(cmd_name, aliases,
56
'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
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
from bzrlib.tests.TestUtil import TestLoader
81
from doctest import DocTestSuite, ELLIPSIS
82
from unittest import TestSuite
84
import tests.test_dotgraph
85
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
import tests.test_link_tree
90
import tests.test_patch
91
import tests.test_mirror
92
import tests.upstream_import
95
import tests.shelf_tests
97
result.addTest(DocTestSuite(bzrtools, optionflags=ELLIPSIS))
98
result.addTest(tests.test_suite())
99
result.addTest(TestLoader().loadTestsFromModule(tests.shelf_tests))
100
result.addTest(tests.blackbox.test_suite())
101
result.addTest(TestLoader().loadTestsFromModule(tests.upstream_import))
102
result.addTest(zap.test_suite())
103
result.addTest(TestLoader().loadTestsFromModule(tests.test_dotgraph))
104
result.addTest(TestLoader().loadTestsFromModule(test_fetch_ghosts))
105
result.addTest(TestLoader().loadTestsFromModule(tests.test_graph))
106
result.addTest(TestLoader().loadTestsFromModule(tests.test_link_tree))
107
result.addTest(TestLoader().loadTestsFromModule(tests.test_patch))
108
result.addTest(TestLoader().loadTestsFromModule(tests.test_cbranch))
109
result.addTest(TestLoader().loadTestsFromModule(tests.test_conflict_diff))
110
result.addTest(TestLoader().loadTestsFromModule(tests.test_mirror))