195
194
self.assertEqual(
196
195
target.open_branch(name='somebranch').user_url,
197
196
target.get_branch_reference(name=""))
200
class TestSmartServerCheckout(TestCaseWithTransport):
202
def test_heavyweight_checkout(self):
203
self.setup_smart_server_with_call_log()
204
t = self.make_branch_and_tree('from')
205
for count in range(9):
206
t.commit(message='commit %d' % count)
207
self.reset_smart_call_log()
208
out, err = self.run_bzr(['checkout', self.get_url('from'), 'target'])
209
# This figure represent the amount of work to perform this use case. It
210
# is entirely ok to reduce this number if a test fails due to rpc_count
211
# being too low. If rpc_count increases, more network roundtrips have
212
# become necessary for this use case. Please do not adjust this number
213
# upwards without agreement from bzr's network support maintainers.
214
self.assertLength(11, self.hpss_calls)
215
self.assertLength(1, self.hpss_connections)
216
self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
218
def test_lightweight_checkout(self):
219
self.setup_smart_server_with_call_log()
220
t = self.make_branch_and_tree('from')
221
for count in range(9):
222
t.commit(message='commit %d' % count)
223
self.reset_smart_call_log()
224
out, err = self.run_bzr(['checkout', '--lightweight', self.get_url('from'),
226
# This figure represent the amount of work to perform this use case. It
227
# is entirely ok to reduce this number if a test fails due to rpc_count
228
# being too low. If rpc_count increases, more network roundtrips have
229
# become necessary for this use case. Please do not adjust this number
230
# upwards without agreement from bzr's network support maintainers.
231
self.assertLength(13, self.hpss_calls)
232
self.assertThat(self.hpss_calls, ContainsNoVfsCalls)