136
136
self.assertEqual(
137
137
'bzr: ERROR: --tree and --revision can not be used together\n',
141
class TestSmartServerRevno(tests.TestCaseWithTransport):
143
def test_simple_branch_revno(self):
144
self.setup_smart_server_with_call_log()
145
t = self.make_branch_and_tree('branch')
146
self.build_tree_contents([('branch/foo', 'thecontents')])
148
revid = t.commit("message")
149
self.reset_smart_call_log()
150
out, err = self.run_bzr(['revno', self.get_url('branch')])
151
# This figure represent the amount of work to perform this use case. It
152
# is entirely ok to reduce this number if a test fails due to rpc_count
153
# being too low. If rpc_count increases, more network roundtrips have
154
# become necessary for this use case. Please do not adjust this number
155
# upwards without agreement from bzr's network support maintainers.
156
self.assertLength(6, self.hpss_calls)
158
def test_simple_branch_revno_lookup(self):
159
self.setup_smart_server_with_call_log()
160
t = self.make_branch_and_tree('branch')
161
self.build_tree_contents([('branch/foo', 'thecontents')])
163
revid1 = t.commit("message")
164
revid2 = t.commit("message")
165
self.reset_smart_call_log()
166
out, err = self.run_bzr(['revno', '-rrevid:' + revid1,
167
self.get_url('branch')])
168
# This figure represent the amount of work to perform this use case. It
169
# is entirely ok to reduce this number if a test fails due to rpc_count
170
# being too low. If rpc_count increases, more network roundtrips have
171
# become necessary for this use case. Please do not adjust this number
172
# upwards without agreement from bzr's network support maintainers.
173
self.assertLength(5, self.hpss_calls)