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 plugin_cmds
23
from version import version_info, __version__
26
ignores.add_runtime_ignores(['./.shelf'])
31
'cmd_branch_history': [],
35
'cmd_fetch_ghosts': ['fetch-missing'],
36
'cmd_graph_ancestry': [],
44
'cmd_shelve1': ['shelve'],
46
'cmd_unshelve1': ['unshelve'],
51
for cmd_name, aliases in commands.items():
52
plugin_cmds.register_lazy(cmd_name, aliases,
53
'bzrlib.plugins.bzrtools.command_classes')
56
plugin_cmds.register_lazy('cmd_heads', [], 'bzrlib.plugins.bzrtools.heads')
59
option.diff_writer_registry.register_lazy(
60
'color', 'bzrlib.plugins.bzrtools.colordiff', 'DiffWriter',
63
option.diff_writer_registry.default_key = 'color'
67
from bzrlib.tests.TestUtil import TestLoader
69
from doctest import DocTestSuite, ELLIPSIS
70
from unittest import TestSuite
72
import tests.clean_tree
73
import tests.test_dotgraph
75
import tests.test_cbranch
76
import tests.test_link_tree
77
import tests.test_patch
78
import tests.test_rspush
79
import tests.upstream_import
82
import tests.shelf_tests
84
result.addTest(DocTestSuite(bzrtools, optionflags=ELLIPSIS))
85
result.addTest(tests.clean_tree.test_suite())
86
result.addTest(tests.test_suite())
87
result.addTest(TestLoader().loadTestsFromModule(tests.shelf_tests))
88
result.addTest(tests.blackbox.test_suite())
89
result.addTest(tests.upstream_import.test_suite())
90
result.addTest(zap.test_suite())
91
result.addTest(TestLoader().loadTestsFromModule(tests.test_dotgraph))
92
result.addTest(TestLoader().loadTestsFromModule(tests.is_clean))
93
result.addTest(TestLoader().loadTestsFromModule(tests.test_link_tree))
94
result.addTest(TestLoader().loadTestsFromModule(tests.test_patch))
95
result.addTest(TestLoader().loadTestsFromModule(tests.test_rspush))
96
result.addTest(TestLoader().loadTestsFromModule(tests.test_cbranch))