301
305
def test_not_an_ancestor(self):
302
self.assertRaises(errors.CommandError,
306
self.assertRaises(errors.BzrCommandError,
303
307
log._generate_all_revisions,
304
308
self.branch, '1.1.1', '2.1.3', 'reverse',
305
309
delayed_graph_generation=True)
307
311
def test_wrong_order(self):
308
self.assertRaises(errors.CommandError,
312
self.assertRaises(errors.BzrCommandError,
309
313
log._generate_all_revisions,
310
314
self.branch, '5', '2.1.3', 'reverse',
311
315
delayed_graph_generation=True)
781
785
out, err = brz('log', encoding=encoding)
783
787
# Make sure we wrote mu as we expected it to exist
784
self.assertNotEqual(-1, out.find(self._message))
789
self.assertNotEqual(-1, out.find(encoded_msg))
790
out_unicode = out.decode(encoding)
793
self.assertNotEqual(-1, out_unicode.find(self._message))
786
795
self.assertNotEqual(-1, out.find('Message with ?'))
1064
1073
self.assertLogRevnos(["--match-author", "author"], ["2", "1"])
1065
1074
self.assertLogRevnos(["--match-author", "author1",
1066
1075
"--match-author", "author2"], ["2", "1"])
1078
class TestSmartServerLog(tests.TestCaseWithTransport):
1080
def test_standard_log(self):
1081
self.setup_smart_server_with_call_log()
1082
t = self.make_branch_and_tree('branch')
1083
self.build_tree_contents([('branch/foo', b'thecontents')])
1086
self.reset_smart_call_log()
1087
out, err = self.run_bzr(['log', self.get_url('branch')])
1088
# This figure represent the amount of work to perform this use case. It
1089
# is entirely ok to reduce this number if a test fails due to rpc_count
1090
# being too low. If rpc_count increases, more network roundtrips have
1091
# become necessary for this use case. Please do not adjust this number
1092
# upwards without agreement from bzr's network support maintainers.
1093
self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
1094
self.assertLength(1, self.hpss_connections)
1095
self.assertLength(9, self.hpss_calls)
1097
def test_verbose_log(self):
1098
self.setup_smart_server_with_call_log()
1099
t = self.make_branch_and_tree('branch')
1100
self.build_tree_contents([('branch/foo', b'thecontents')])
1103
self.reset_smart_call_log()
1104
out, err = self.run_bzr(['log', '-v', self.get_url('branch')])
1105
# This figure represent the amount of work to perform this use case. It
1106
# is entirely ok to reduce this number if a test fails due to rpc_count
1107
# being too low. If rpc_count increases, more network roundtrips have
1108
# become necessary for this use case. Please do not adjust this number
1109
# upwards without agreement from bzr's network support maintainers.
1110
self.assertLength(10, self.hpss_calls)
1111
self.assertLength(1, self.hpss_connections)
1112
self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
1114
def test_per_file(self):
1115
self.setup_smart_server_with_call_log()
1116
t = self.make_branch_and_tree('branch')
1117
self.build_tree_contents([('branch/foo', b'thecontents')])
1120
self.reset_smart_call_log()
1121
out, err = self.run_bzr(['log', '-v', self.get_url('branch') + "/foo"])
1122
# This figure represent the amount of work to perform this use case. It
1123
# is entirely ok to reduce this number if a test fails due to rpc_count
1124
# being too low. If rpc_count increases, more network roundtrips have
1125
# become necessary for this use case. Please do not adjust this number
1126
# upwards without agreement from bzr's network support maintainers.
1127
self.assertLength(14, self.hpss_calls)
1128
self.assertLength(1, self.hpss_connections)
1129
self.assertThat(self.hpss_calls, ContainsNoVfsCalls)