236
236
% (self.test_dir, self.test_dir),
237
237
self.test_dir, recursive=False)
239
def test_ls_directory(self):
240
"""Test --directory option"""
241
self.wt = self.make_branch_and_tree('dir')
242
self.build_tree(['dir/sub/', 'dir/sub/file'])
243
self.wt.add(['sub', 'sub/file'])
244
self.wt.commit('commit')
245
self.ls_equals('sub/\nsub/file\n', '--directory=dir')
246
self.ls_equals('sub/file\n', '-d dir sub')
249
class TestSmartServerLs(TestCaseWithTransport):
251
def test_simple_ls(self):
252
self.setup_smart_server_with_call_log()
253
t = self.make_branch_and_tree('branch')
254
self.build_tree_contents([('branch/foo', 'thecontents')])
257
self.reset_smart_call_log()
258
out, err = self.run_bzr(['ls', self.get_url('branch')])
259
# This figure represent the amount of work to perform this use case. It
260
# is entirely ok to reduce this number if a test fails due to rpc_count
261
# being too low. If rpc_count increases, more network roundtrips have
262
# become necessary for this use case. Please do not adjust this number
263
# upwards without agreement from bzr's network support maintainers.
264
self.assertLength(15, self.hpss_calls)