46
47
self.assertEqual(out, '')
47
48
self.assertEqual(err, 'bzr: ERROR: Not a branch: "%s".\n' % location)
50
def test_info_empty_controldir(self):
51
self.make_bzrdir('ctrl')
52
out, err = self.run_bzr('info ctrl')
53
self.assertEquals(out,
54
'Empty control directory (format: 2a or pack-0.92)\n'
56
' control directory: ctrl\n')
57
self.assertEquals(err, '')
59
def test_info_dangling_branch_reference(self):
60
br = self.make_branch('target')
61
br.create_checkout('from', lightweight=True)
62
shutil.rmtree('target')
63
out, err = self.run_bzr('info from')
64
self.assertEquals(out,
65
'Dangling branch reference (format: 2a or pack-0.92)\n'
67
' control directory: from\n'
68
' checkout of branch: target\n')
69
self.assertEquals(err, '')
49
71
def test_info_standalone(self):
50
72
transport = self.get_transport()
1405
1427
self.assertEqual("", err)
1430
class TestSmartServerInfo(tests.TestCaseWithTransport):
1432
def test_simple_branch_info(self):
1433
self.setup_smart_server_with_call_log()
1434
t = self.make_branch_and_tree('branch')
1435
self.build_tree_contents([('branch/foo', 'thecontents')])
1438
self.reset_smart_call_log()
1439
out, err = self.run_bzr(['info', self.get_url('branch')])
1440
# This figure represent the amount of work to perform this use case. It
1441
# is entirely ok to reduce this number if a test fails due to rpc_count
1442
# being too low. If rpc_count increases, more network roundtrips have
1443
# become necessary for this use case. Please do not adjust this number
1444
# upwards without agreement from bzr's network support maintainers.
1445
self.assertLength(12, self.hpss_calls)
1447
def test_verbose_branch_info(self):
1448
self.setup_smart_server_with_call_log()
1449
t = self.make_branch_and_tree('branch')
1450
self.build_tree_contents([('branch/foo', 'thecontents')])
1453
self.reset_smart_call_log()
1454
out, err = self.run_bzr(['info', '-v', self.get_url('branch')])
1455
# This figure represent the amount of work to perform this use case. It
1456
# is entirely ok to reduce this number if a test fails due to rpc_count
1457
# being too low. If rpc_count increases, more network roundtrips have
1458
# become necessary for this use case. Please do not adjust this number
1459
# upwards without agreement from bzr's network support maintainers.
1460
self.assertLength(16, self.hpss_calls)