47
49
SuccessfulSmartServerResponse,
49
51
from bzrlib.tests import (
54
54
from bzrlib.transport import chroot, get_transport
55
from bzrlib.util import bencode
58
57
def load_tests(standard_tests, module, loader):
59
58
"""Multiply tests version and protocol consistency."""
60
59
# FindRepository tests.
61
60
bzrdir_mod = bzrlib.smart.bzrdir
62
applier = TestScenarioApplier()
64
62
("find_repository", {
65
63
"_request_class":bzrdir_mod.SmartServerRequestFindRepositoryV1}),
66
64
("find_repositoryV2", {
67
65
"_request_class":bzrdir_mod.SmartServerRequestFindRepositoryV2}),
66
("find_repositoryV3", {
67
"_request_class":bzrdir_mod.SmartServerRequestFindRepositoryV3}),
69
69
to_adapt, result = split_suite_by_re(standard_tests,
70
70
"TestSmartServerRequestFindRepository")
71
71
v2_only, v1_and_2 = split_suite_by_re(to_adapt,
73
for test in iter_suite_tests(v1_and_2):
74
result.addTests(applier.adapt(test))
75
del applier.scenarios[0]
76
for test in iter_suite_tests(v2_only):
77
result.addTests(applier.adapt(test))
73
tests.multiply_tests(v1_and_2, scenarios, result)
74
# The first scenario is only applicable to v1 protocols, it is deleted
76
tests.multiply_tests(v2_only, scenarios[1:], result)
160
159
request.transport_from_client_path('foo/').base)
162
class TestSmartServerBzrDirRequestCloningMetaDir(
163
tests.TestCaseWithMemoryTransport):
164
"""Tests for BzrDir.cloning_metadir."""
166
def test_cloning_metadir(self):
167
"""When there is a bzrdir present, the call succeeds."""
168
backing = self.get_transport()
169
dir = self.make_bzrdir('.')
170
local_result = dir.cloning_metadir()
171
request_class = smart_dir.SmartServerBzrDirRequestCloningMetaDir
172
request = request_class(backing)
173
expected = SuccessfulSmartServerResponse(
174
(local_result.network_name(),
175
local_result.repository_format.network_name(),
176
('branch', local_result.get_branch_format().network_name())))
177
self.assertEqual(expected, request.execute('', 'False'))
179
def test_cloning_metadir_reference(self):
180
"""The request fails when bzrdir contains a branch reference."""
181
backing = self.get_transport()
182
referenced_branch = self.make_branch('referenced')
183
dir = self.make_bzrdir('.')
184
local_result = dir.cloning_metadir()
185
reference = BranchReferenceFormat().initialize(dir, referenced_branch)
186
reference_url = BranchReferenceFormat().get_reference(dir)
187
# The server shouldn't try to follow the branch reference, so it's fine
188
# if the referenced branch isn't reachable.
189
backing.rename('referenced', 'moved')
190
request_class = smart_dir.SmartServerBzrDirRequestCloningMetaDir
191
request = request_class(backing)
192
expected = FailedSmartServerResponse(('BranchReference',))
193
self.assertEqual(expected, request.execute('', 'False'))
196
class TestSmartServerRequestCreateRepository(tests.TestCaseWithMemoryTransport):
197
"""Tests for BzrDir.create_repository."""
199
def test_makes_repository(self):
200
"""When there is a bzrdir present, the call succeeds."""
201
backing = self.get_transport()
202
self.make_bzrdir('.')
203
request_class = bzrlib.smart.bzrdir.SmartServerRequestCreateRepository
204
request = request_class(backing)
205
reference_bzrdir_format = bzrdir.format_registry.get('default')()
206
reference_format = reference_bzrdir_format.repository_format
207
network_name = reference_format.network_name()
208
expected = SuccessfulSmartServerResponse(
209
('ok', 'no', 'no', 'no', network_name))
210
self.assertEqual(expected, request.execute('', network_name, 'True'))
163
213
class TestSmartServerRequestFindRepository(tests.TestCaseWithMemoryTransport):
164
214
"""Tests for BzrDir.find_repository."""
241
296
self.assertEqual(result, request.execute(''))
299
class TestSmartServerBzrDirRequestGetConfigFile(
300
tests.TestCaseWithMemoryTransport):
301
"""Tests for BzrDir.get_config_file."""
303
def test_present(self):
304
backing = self.get_transport()
305
dir = self.make_bzrdir('.')
306
dir.get_config().set_default_stack_on("/")
307
local_result = dir._get_config()._get_config_file().read()
308
request_class = smart_dir.SmartServerBzrDirRequestConfigFile
309
request = request_class(backing)
310
expected = SuccessfulSmartServerResponse((), local_result)
311
self.assertEqual(expected, request.execute(''))
313
def test_missing(self):
314
backing = self.get_transport()
315
dir = self.make_bzrdir('.')
316
request_class = smart_dir.SmartServerBzrDirRequestConfigFile
317
request = request_class(backing)
318
expected = SuccessfulSmartServerResponse((), '')
319
self.assertEqual(expected, request.execute(''))
244
322
class TestSmartServerRequestInitializeBzrDir(tests.TestCaseWithMemoryTransport):
246
324
def test_empty_dir(self):
272
350
request.execute, 'subdir')
353
class TestSmartServerRequestBzrDirInitializeEx(tests.TestCaseWithMemoryTransport):
354
"""Basic tests for BzrDir.initialize_ex_1.16 in the smart server.
356
The main unit tests in test_bzrdir exercise the API comprehensively.
359
def test_empty_dir(self):
360
"""Initializing an empty dir should succeed and do it."""
361
backing = self.get_transport()
362
name = self.make_bzrdir('reference')._format.network_name()
363
request = smart.bzrdir.SmartServerRequestBzrDirInitializeEx(backing)
364
self.assertEqual(SmartServerResponse(('', '', '', '', '', '', name,
365
'False', '', '', '')),
366
request.execute(name, '', 'True', 'False', 'False', '', '', '', '',
368
made_dir = bzrdir.BzrDir.open_from_transport(backing)
369
# no branch, tree or repository is expected with the current
371
self.assertRaises(errors.NoWorkingTree, made_dir.open_workingtree)
372
self.assertRaises(errors.NotBranchError, made_dir.open_branch)
373
self.assertRaises(errors.NoRepositoryPresent, made_dir.open_repository)
375
def test_missing_dir(self):
376
"""Initializing a missing directory should fail like the bzrdir api."""
377
backing = self.get_transport()
378
name = self.make_bzrdir('reference')._format.network_name()
379
request = smart.bzrdir.SmartServerRequestBzrDirInitializeEx(backing)
380
self.assertRaises(errors.NoSuchFile, request.execute, name,
381
'subdir/dir', 'False', 'False', 'False', '', '', '', '', 'False')
383
def test_initialized_dir(self):
384
"""Initializing an extant directory should fail like the bzrdir api."""
385
backing = self.get_transport()
386
name = self.make_bzrdir('reference')._format.network_name()
387
request = smart.bzrdir.SmartServerRequestBzrDirInitializeEx(backing)
388
self.make_bzrdir('subdir')
389
self.assertRaises(errors.FileExists, request.execute, name, 'subdir',
390
'False', 'False', 'False', '', '', '', '', 'False')
275
393
class TestSmartServerRequestOpenBranch(TestCaseWithChrootedTransport):
277
395
def test_no_branch(self):
302
420
request.execute('reference'))
423
class TestSmartServerRequestOpenBranchV2(TestCaseWithChrootedTransport):
425
def test_no_branch(self):
426
"""When there is no branch, ('nobranch', ) is returned."""
427
backing = self.get_transport()
428
self.make_bzrdir('.')
429
request = smart.bzrdir.SmartServerRequestOpenBranchV2(backing)
430
self.assertEqual(SmartServerResponse(('nobranch', )),
433
def test_branch(self):
434
"""When there is a branch, 'ok' is returned."""
435
backing = self.get_transport()
436
expected = self.make_branch('.')._format.network_name()
437
request = smart.bzrdir.SmartServerRequestOpenBranchV2(backing)
438
self.assertEqual(SuccessfulSmartServerResponse(('branch', expected)),
441
def test_branch_reference(self):
442
"""When there is a branch reference, the reference URL is returned."""
443
backing = self.get_transport()
444
request = smart.bzrdir.SmartServerRequestOpenBranchV2(backing)
445
branch = self.make_branch('branch')
446
checkout = branch.create_checkout('reference',lightweight=True)
447
reference_url = BranchReferenceFormat().get_reference(checkout.bzrdir)
448
self.assertFileEqual(reference_url, 'reference/.bzr/branch/location')
449
self.assertEqual(SuccessfulSmartServerResponse(('ref', reference_url)),
450
request.execute('reference'))
452
def test_stacked_branch(self):
453
"""Opening a stacked branch does not open the stacked-on branch."""
454
trunk = self.make_branch('trunk')
455
feature = self.make_branch('feature', format='1.9')
456
feature.set_stacked_on_url(trunk.base)
458
Branch.hooks.install_named_hook('open', opened_branches.append, None)
459
backing = self.get_transport()
460
request = smart.bzrdir.SmartServerRequestOpenBranchV2(backing)
463
response = request.execute('feature')
465
request.teardown_jail()
466
expected_format = feature._format.network_name()
468
SuccessfulSmartServerResponse(('branch', expected_format)),
470
self.assertLength(1, opened_branches)
305
473
class TestSmartServerRequestRevisionHistory(tests.TestCaseWithMemoryTransport):
307
475
def test_empty(self):
397
565
request.execute(''))
400
class SetLastRevisionTestBase(tests.TestCaseWithMemoryTransport):
568
class TestLockedBranch(tests.TestCaseWithMemoryTransport):
570
def get_lock_tokens(self, branch):
571
branch_token = branch.lock_write()
572
repo_token = branch.repository.lock_write()
573
branch.repository.unlock()
574
return branch_token, repo_token
577
class TestSmartServerBranchRequestSetConfigOption(TestLockedBranch):
579
def test_value_name(self):
580
branch = self.make_branch('.')
581
request = smart.branch.SmartServerBranchRequestSetConfigOption(
582
branch.bzrdir.root_transport)
583
branch_token, repo_token = self.get_lock_tokens(branch)
584
config = branch._get_config()
585
result = request.execute('', branch_token, repo_token, 'bar', 'foo',
587
self.assertEqual(SuccessfulSmartServerResponse(()), result)
588
self.assertEqual('bar', config.get_option('foo'))
592
def test_value_name_section(self):
593
branch = self.make_branch('.')
594
request = smart.branch.SmartServerBranchRequestSetConfigOption(
595
branch.bzrdir.root_transport)
596
branch_token, repo_token = self.get_lock_tokens(branch)
597
config = branch._get_config()
598
result = request.execute('', branch_token, repo_token, 'bar', 'foo',
600
self.assertEqual(SuccessfulSmartServerResponse(()), result)
601
self.assertEqual('bar', config.get_option('foo', 'gam'))
606
class SetLastRevisionTestBase(TestLockedBranch):
401
607
"""Base test case for verbs that implement set_last_revision."""
615
817
self.assertEqual('child-1', self.tree.branch.last_revision())
820
class TestSmartServerBranchRequestGetParent(tests.TestCaseWithMemoryTransport):
822
def test_get_parent_none(self):
823
base_branch = self.make_branch('base')
824
request = smart.branch.SmartServerBranchGetParent(self.get_transport())
825
response = request.execute('base')
827
SuccessfulSmartServerResponse(('',)), response)
829
def test_get_parent_something(self):
830
base_branch = self.make_branch('base')
831
base_branch.set_parent(self.get_url('foo'))
832
request = smart.branch.SmartServerBranchGetParent(self.get_transport())
833
response = request.execute('base')
835
SuccessfulSmartServerResponse(("../foo",)),
839
class TestSmartServerBranchRequestSetParent(tests.TestCaseWithMemoryTransport):
841
def test_set_parent_none(self):
842
branch = self.make_branch('base', format="1.9")
844
branch._set_parent_location('foo')
846
request = smart.branch.SmartServerBranchRequestSetParentLocation(
847
self.get_transport())
848
branch_token = branch.lock_write()
849
repo_token = branch.repository.lock_write()
851
response = request.execute('base', branch_token, repo_token, '')
853
branch.repository.unlock()
855
self.assertEqual(SuccessfulSmartServerResponse(()), response)
856
self.assertEqual(None, branch.get_parent())
858
def test_set_parent_something(self):
859
branch = self.make_branch('base', format="1.9")
860
request = smart.branch.SmartServerBranchRequestSetParentLocation(
861
self.get_transport())
862
branch_token = branch.lock_write()
863
repo_token = branch.repository.lock_write()
865
response = request.execute('base', branch_token, repo_token,
868
branch.repository.unlock()
870
self.assertEqual(SuccessfulSmartServerResponse(()), response)
871
self.assertEqual('http://bar/', branch.get_parent())
874
class TestSmartServerBranchRequestGetTagsBytes(tests.TestCaseWithMemoryTransport):
875
# Only called when the branch format and tags match [yay factory
876
# methods] so only need to test straight forward cases.
878
def test_get_bytes(self):
879
base_branch = self.make_branch('base')
880
request = smart.branch.SmartServerBranchGetTagsBytes(
881
self.get_transport())
882
response = request.execute('base')
884
SuccessfulSmartServerResponse(('',)), response)
618
887
class TestSmartServerBranchRequestGetStackedOnURL(tests.TestCaseWithMemoryTransport):
620
889
def test_get_stacked_on_url(self):
691
974
branch_token+'xxx', repo_token)
692
975
self.assertEqual(
693
976
SmartServerResponse(('TokenMismatch',)), response)
978
branch.repository.lock_write(repo_token)
979
branch.repository.dont_leave_lock_in_place()
980
branch.repository.unlock()
981
branch.lock_write(branch_token)
982
branch.dont_leave_lock_in_place()
695
985
def test_lock_write_on_locked_repo(self):
696
986
backing = self.get_transport()
697
987
request = smart.branch.SmartServerBranchRequestLockWrite(backing)
698
988
branch = self.make_branch('.', format='knit')
699
branch.repository.lock_write()
700
branch.repository.leave_lock_in_place()
701
branch.repository.unlock()
989
repo = branch.repository
990
repo_token = repo.lock_write()
991
repo.leave_lock_in_place()
702
993
response = request.execute('')
703
994
self.assertEqual(
704
995
SmartServerResponse(('LockContention',)), response)
997
repo.lock_write(repo_token)
998
repo.dont_leave_lock_in_place()
706
1001
def test_lock_write_on_readonly_transport(self):
707
1002
backing = self.get_readonly_transport()
850
1161
request.execute('', 'missingrevision'))
1164
class TestSmartServerRepositoryGetRevIdForRevno(tests.TestCaseWithMemoryTransport):
1166
def test_revno_found(self):
1167
backing = self.get_transport()
1168
request = smart.repository.SmartServerRepositoryGetRevIdForRevno(backing)
1169
tree = self.make_branch_and_memory_tree('.')
1172
rev1_id_utf8 = u'\xc8'.encode('utf-8')
1173
rev2_id_utf8 = u'\xc9'.encode('utf-8')
1174
tree.commit('1st commit', rev_id=rev1_id_utf8)
1175
tree.commit('2nd commit', rev_id=rev2_id_utf8)
1178
self.assertEqual(SmartServerResponse(('ok', rev1_id_utf8)),
1179
request.execute('', 1, (2, rev2_id_utf8)))
1181
def test_known_revid_missing(self):
1182
backing = self.get_transport()
1183
request = smart.repository.SmartServerRepositoryGetRevIdForRevno(backing)
1184
repo = self.make_repository('.')
1186
FailedSmartServerResponse(('nosuchrevision', 'ghost')),
1187
request.execute('', 1, (2, 'ghost')))
1189
def test_history_incomplete(self):
1190
backing = self.get_transport()
1191
request = smart.repository.SmartServerRepositoryGetRevIdForRevno(backing)
1192
parent = self.make_branch_and_memory_tree('parent', format='1.9')
1193
r1 = parent.commit(message='first commit')
1194
r2 = parent.commit(message='second commit')
1195
local = self.make_branch_and_memory_tree('local', format='1.9')
1196
local.branch.pull(parent.branch)
1197
local.set_parent_ids([r2])
1198
r3 = local.commit(message='local commit')
1199
local.branch.create_clone_on_transport(
1200
self.get_transport('stacked'), stacked_on=self.get_url('parent'))
1202
SmartServerResponse(('history-incomplete', 2, r2)),
1203
request.execute('stacked', 1, (3, r3)))
1205
class TestSmartServerRepositoryGetStream(tests.TestCaseWithMemoryTransport):
1207
def make_two_commit_repo(self):
1208
tree = self.make_branch_and_memory_tree('.')
1211
r1 = tree.commit('1st commit')
1212
r2 = tree.commit('2nd commit', rev_id=u'\xc8'.encode('utf-8'))
1214
repo = tree.branch.repository
1217
def test_ancestry_of(self):
1218
"""The search argument may be a 'ancestry-of' some heads'."""
1219
backing = self.get_transport()
1220
request = smart.repository.SmartServerRepositoryGetStream(backing)
1221
repo, r1, r2 = self.make_two_commit_repo()
1222
fetch_spec = ['ancestry-of', r2]
1223
lines = '\n'.join(fetch_spec)
1224
request.execute('', repo._format.network_name())
1225
response = request.do_body(lines)
1226
self.assertEqual(('ok',), response.args)
1227
stream_bytes = ''.join(response.body_stream)
1228
self.assertStartsWith(stream_bytes, 'Bazaar pack format 1')
1230
def test_search(self):
1231
"""The search argument may be a 'search' of some explicit keys."""
1232
backing = self.get_transport()
1233
request = smart.repository.SmartServerRepositoryGetStream(backing)
1234
repo, r1, r2 = self.make_two_commit_repo()
1235
fetch_spec = ['search', '%s %s' % (r1, r2), 'null:', '2']
1236
lines = '\n'.join(fetch_spec)
1237
request.execute('', repo._format.network_name())
1238
response = request.do_body(lines)
1239
self.assertEqual(('ok',), response.args)
1240
stream_bytes = ''.join(response.body_stream)
1241
self.assertStartsWith(stream_bytes, 'Bazaar pack format 1')
853
1244
class TestSmartServerRequestHasRevision(tests.TestCaseWithMemoryTransport):
855
1246
def test_missing_revision(self):
990
1385
self.assertEqual('LockFailed', response.args[0])
1388
class TestInsertStreamBase(tests.TestCaseWithMemoryTransport):
1390
def make_empty_byte_stream(self, repo):
1391
byte_stream = smart.repository._stream_to_byte_stream([], repo._format)
1392
return ''.join(byte_stream)
1395
class TestSmartServerRepositoryInsertStream(TestInsertStreamBase):
1397
def test_insert_stream_empty(self):
1398
backing = self.get_transport()
1399
request = smart.repository.SmartServerRepositoryInsertStream(backing)
1400
repository = self.make_repository('.')
1401
response = request.execute('', '')
1402
self.assertEqual(None, response)
1403
response = request.do_chunk(self.make_empty_byte_stream(repository))
1404
self.assertEqual(None, response)
1405
response = request.do_end()
1406
self.assertEqual(SmartServerResponse(('ok', )), response)
1409
class TestSmartServerRepositoryInsertStreamLocked(TestInsertStreamBase):
1411
def test_insert_stream_empty(self):
1412
backing = self.get_transport()
1413
request = smart.repository.SmartServerRepositoryInsertStreamLocked(
1415
repository = self.make_repository('.', format='knit')
1416
lock_token = repository.lock_write()
1417
response = request.execute('', '', lock_token)
1418
self.assertEqual(None, response)
1419
response = request.do_chunk(self.make_empty_byte_stream(repository))
1420
self.assertEqual(None, response)
1421
response = request.do_end()
1422
self.assertEqual(SmartServerResponse(('ok', )), response)
1425
def test_insert_stream_with_wrong_lock_token(self):
1426
backing = self.get_transport()
1427
request = smart.repository.SmartServerRepositoryInsertStreamLocked(
1429
repository = self.make_repository('.', format='knit')
1430
lock_token = repository.lock_write()
1432
errors.TokenMismatch, request.execute, '', '', 'wrong-token')
993
1436
class TestSmartServerRepositoryUnlock(tests.TestCaseWithMemoryTransport):
995
1438
def setUp(self):
1037
1480
SmartServerResponse(('yes',)), response)
1483
class TestSmartServerRepositorySetMakeWorkingTrees(tests.TestCaseWithMemoryTransport):
1485
def test_set_false(self):
1486
backing = self.get_transport()
1487
repo = self.make_repository('.', shared=True)
1488
repo.set_make_working_trees(True)
1489
request_class = smart.repository.SmartServerRepositorySetMakeWorkingTrees
1490
request = request_class(backing)
1491
self.assertEqual(SuccessfulSmartServerResponse(('ok',)),
1492
request.execute('', 'False'))
1493
repo = repo.bzrdir.open_repository()
1494
self.assertFalse(repo.make_working_trees())
1496
def test_set_true(self):
1497
backing = self.get_transport()
1498
repo = self.make_repository('.', shared=True)
1499
repo.set_make_working_trees(False)
1500
request_class = smart.repository.SmartServerRepositorySetMakeWorkingTrees
1501
request = request_class(backing)
1502
self.assertEqual(SuccessfulSmartServerResponse(('ok',)),
1503
request.execute('', 'True'))
1504
repo = repo.bzrdir.open_repository()
1505
self.assertTrue(repo.make_working_trees())
1040
1508
class TestSmartServerPackRepositoryAutopack(tests.TestCaseWithTransport):
1042
1510
def make_repo_needing_autopacking(self, path='.'):
1094
1566
for key, item in smart.request.request_handlers.iteritems():
1569
def assertHandlerEqual(self, verb, handler):
1570
self.assertEqual(smart.request.request_handlers.get(verb), handler)
1097
1572
def test_registered_methods(self):
1098
1573
"""Test that known methods are registered to the correct object."""
1100
smart.request.request_handlers.get('Branch.get_config_file'),
1574
self.assertHandlerEqual('Branch.get_config_file',
1101
1575
smart.branch.SmartServerBranchGetConfigFile)
1103
smart.request.request_handlers.get('Branch.lock_write'),
1576
self.assertHandlerEqual('Branch.get_parent',
1577
smart.branch.SmartServerBranchGetParent)
1578
self.assertHandlerEqual('Branch.get_tags_bytes',
1579
smart.branch.SmartServerBranchGetTagsBytes)
1580
self.assertHandlerEqual('Branch.lock_write',
1104
1581
smart.branch.SmartServerBranchRequestLockWrite)
1106
smart.request.request_handlers.get('Branch.last_revision_info'),
1582
self.assertHandlerEqual('Branch.last_revision_info',
1107
1583
smart.branch.SmartServerBranchRequestLastRevisionInfo)
1109
smart.request.request_handlers.get('Branch.revision_history'),
1584
self.assertHandlerEqual('Branch.revision_history',
1110
1585
smart.branch.SmartServerRequestRevisionHistory)
1112
smart.request.request_handlers.get('Branch.set_last_revision'),
1586
self.assertHandlerEqual('Branch.set_config_option',
1587
smart.branch.SmartServerBranchRequestSetConfigOption)
1588
self.assertHandlerEqual('Branch.set_last_revision',
1113
1589
smart.branch.SmartServerBranchRequestSetLastRevision)
1115
smart.request.request_handlers.get('Branch.set_last_revision_info'),
1590
self.assertHandlerEqual('Branch.set_last_revision_info',
1116
1591
smart.branch.SmartServerBranchRequestSetLastRevisionInfo)
1118
smart.request.request_handlers.get('Branch.unlock'),
1592
self.assertHandlerEqual('Branch.set_last_revision_ex',
1593
smart.branch.SmartServerBranchRequestSetLastRevisionEx)
1594
self.assertHandlerEqual('Branch.set_parent_location',
1595
smart.branch.SmartServerBranchRequestSetParentLocation)
1596
self.assertHandlerEqual('Branch.unlock',
1119
1597
smart.branch.SmartServerBranchRequestUnlock)
1121
smart.request.request_handlers.get('BzrDir.find_repository'),
1598
self.assertHandlerEqual('BzrDir.find_repository',
1122
1599
smart.bzrdir.SmartServerRequestFindRepositoryV1)
1124
smart.request.request_handlers.get('BzrDir.find_repositoryV2'),
1600
self.assertHandlerEqual('BzrDir.find_repositoryV2',
1125
1601
smart.bzrdir.SmartServerRequestFindRepositoryV2)
1127
smart.request.request_handlers.get('BzrDirFormat.initialize'),
1602
self.assertHandlerEqual('BzrDirFormat.initialize',
1128
1603
smart.bzrdir.SmartServerRequestInitializeBzrDir)
1130
smart.request.request_handlers.get('BzrDir.open_branch'),
1604
self.assertHandlerEqual('BzrDirFormat.initialize_ex_1.16',
1605
smart.bzrdir.SmartServerRequestBzrDirInitializeEx)
1606
self.assertHandlerEqual('BzrDir.cloning_metadir',
1607
smart.bzrdir.SmartServerBzrDirRequestCloningMetaDir)
1608
self.assertHandlerEqual('BzrDir.get_config_file',
1609
smart.bzrdir.SmartServerBzrDirRequestConfigFile)
1610
self.assertHandlerEqual('BzrDir.open_branch',
1131
1611
smart.bzrdir.SmartServerRequestOpenBranch)
1133
smart.request.request_handlers.get('PackRepository.autopack'),
1612
self.assertHandlerEqual('BzrDir.open_branchV2',
1613
smart.bzrdir.SmartServerRequestOpenBranchV2)
1614
self.assertHandlerEqual('PackRepository.autopack',
1134
1615
smart.packrepository.SmartServerPackRepositoryAutopack)
1136
smart.request.request_handlers.get('Repository.gather_stats'),
1616
self.assertHandlerEqual('Repository.gather_stats',
1137
1617
smart.repository.SmartServerRepositoryGatherStats)
1139
smart.request.request_handlers.get('Repository.get_parent_map'),
1618
self.assertHandlerEqual('Repository.get_parent_map',
1140
1619
smart.repository.SmartServerRepositoryGetParentMap)
1142
smart.request.request_handlers.get(
1143
'Repository.get_revision_graph'),
1620
self.assertHandlerEqual('Repository.get_rev_id_for_revno',
1621
smart.repository.SmartServerRepositoryGetRevIdForRevno)
1622
self.assertHandlerEqual('Repository.get_revision_graph',
1144
1623
smart.repository.SmartServerRepositoryGetRevisionGraph)
1146
smart.request.request_handlers.get('Repository.has_revision'),
1624
self.assertHandlerEqual('Repository.get_stream',
1625
smart.repository.SmartServerRepositoryGetStream)
1626
self.assertHandlerEqual('Repository.has_revision',
1147
1627
smart.repository.SmartServerRequestHasRevision)
1149
smart.request.request_handlers.get('Repository.is_shared'),
1628
self.assertHandlerEqual('Repository.insert_stream',
1629
smart.repository.SmartServerRepositoryInsertStream)
1630
self.assertHandlerEqual('Repository.insert_stream_locked',
1631
smart.repository.SmartServerRepositoryInsertStreamLocked)
1632
self.assertHandlerEqual('Repository.is_shared',
1150
1633
smart.repository.SmartServerRepositoryIsShared)
1152
smart.request.request_handlers.get('Repository.lock_write'),
1634
self.assertHandlerEqual('Repository.lock_write',
1153
1635
smart.repository.SmartServerRepositoryLockWrite)
1155
smart.request.request_handlers.get('Repository.tarball'),
1636
self.assertHandlerEqual('Repository.tarball',
1156
1637
smart.repository.SmartServerRepositoryTarball)
1158
smart.request.request_handlers.get('Repository.unlock'),
1638
self.assertHandlerEqual('Repository.unlock',
1159
1639
smart.repository.SmartServerRepositoryUnlock)
1161
smart.request.request_handlers.get('Transport.is_readonly'),
1640
self.assertHandlerEqual('Transport.is_readonly',
1162
1641
smart.request.SmartServerIsReadonly)