22
22
from testtools import content
25
25
plugins as _mod_plugins,
28
from brzlib.controldir import ControlDir
29
from brzlib.smart import medium
30
from brzlib.transport import remote
28
from breezy.controldir import ControlDir
29
from breezy.smart import medium
30
from breezy.transport import remote
32
from brzlib.plugin import (
32
from breezy.plugin import (
33
33
are_plugins_disabled,
36
from brzlib.tests import (
36
from breezy.tests import (
37
37
TestCaseWithTransport,
40
40
old_format_modules = [
41
'brzlib.repofmt.knitrepo',
42
'brzlib.repofmt.knitpack_repo',
43
'brzlib.plugins.weave_fmt.branch',
44
'brzlib.plugins.weave_fmt.bzrdir',
45
'brzlib.plugins.weave_fmt.repository',
46
'brzlib.plugins.weave_fmt.workingtree',
41
'breezy.repofmt.knitrepo',
42
'breezy.repofmt.knitpack_repo',
43
'breezy.plugins.weave_fmt.branch',
44
'breezy.plugins.weave_fmt.bzrdir',
45
'breezy.plugins.weave_fmt.repository',
46
'breezy.plugins.weave_fmt.workingtree',
154
154
self.assertRaises(AssertionError,
155
155
self.run_command_check_imports,
159
159
def test_simple_local(self):
160
160
# 'st' in a default format working tree shouldn't need many modules
161
161
self.make_branch_and_tree('.')
162
162
self.run_command_check_imports(['st'], [
166
'brzlib.bundle.commands',
167
'brzlib.cmd_version_info',
168
'brzlib.externalcommand',
166
'breezy.bundle.commands',
167
'breezy.cmd_version_info',
168
'breezy.externalcommand',
171
171
# foreign branch plugins import the foreign_vcs_registry from
172
# brzlib.foreign so it can't be blacklisted
177
'brzlib.merge_directive',
179
'brzlib.patiencediff',
182
'brzlib.sign_my_commits',
184
'brzlib.smart.client',
185
'brzlib.smart.medium',
186
'brzlib.smart.server',
188
'brzlib.version_info_formats.format_rio',
189
'brzlib.xml_serializer',
172
# breezy.foreign so it can't be blacklisted
177
'breezy.merge_directive',
179
'breezy.patiencediff',
182
'breezy.sign_my_commits',
184
'breezy.smart.client',
185
'breezy.smart.medium',
186
'breezy.smart.server',
188
'breezy.version_info_formats.format_rio',
189
'breezy.xml_serializer',
233
233
with open('bzr-serve.stderr', 'r') as stderr_file:
234
234
err = stderr_file.read()
235
235
self.check_forbidden_modules(err,
239
'brzlib.bundle.commands',
240
'brzlib.cmd_version_info',
242
'brzlib._dirstate_helpers_py',
243
'brzlib._dirstate_helpers_pyx',
244
'brzlib.externalcommand',
239
'breezy.bundle.commands',
240
'breezy.cmd_version_info',
242
'breezy._dirstate_helpers_py',
243
'breezy._dirstate_helpers_pyx',
244
'breezy.externalcommand',
247
247
# foreign branch plugins import the foreign_vcs_registry from
248
# brzlib.foreign so it can't be blacklisted
253
'brzlib.merge_directive',
255
'brzlib.patiencediff',
258
'brzlib.sign_my_commits',
259
'brzlib.smart.client',
261
'brzlib.version_info_formats.format_rio',
262
'brzlib.workingtree_4',
263
'brzlib.xml_serializer',
248
# breezy.foreign so it can't be blacklisted
253
'breezy.merge_directive',
255
'breezy.patiencediff',
258
'breezy.sign_my_commits',
259
'breezy.smart.client',
261
'breezy.version_info_formats.format_rio',
262
'breezy.workingtree_4',
263
'breezy.xml_serializer',