305
304
wt.commit('commit', committer='test@user')
306
305
out, err = self.run_bzr(['annotate', '-d', 'a', 'hello.txt'])
307
306
self.assertEqualDiff('1 test@us | my helicopter\n', out)
310
class TestSmartServerAnnotate(tests.TestCaseWithTransport):
312
def test_simple_annotate(self):
313
self.setup_smart_server_with_call_log()
314
wt = self.make_branch_and_tree('branch')
315
self.build_tree_contents([('branch/hello.txt', b'my helicopter\n')])
316
wt.add(['hello.txt'])
317
wt.commit('commit', committer='test@user')
318
self.reset_smart_call_log()
319
out, err = self.run_bzr(['annotate', "-d", self.get_url('branch'),
321
# This figure represent the amount of work to perform this use case. It
322
# is entirely ok to reduce this number if a test fails due to rpc_count
323
# being too low. If rpc_count increases, more network roundtrips have
324
# become necessary for this use case. Please do not adjust this number
325
# upwards without agreement from bzr's network support maintainers.
326
self.assertLength(9, self.hpss_calls)
327
self.assertLength(1, self.hpss_connections)
328
self.assertThat(self.hpss_calls, ContainsNoVfsCalls)