239
239
out, err = self.run_bzr(["add", "a", "b"], working_dir=u"\xA7")
240
240
self.assertEquals(out, "adding a\n" "adding b\n")
241
241
self.assertEquals(err, "")
243
def test_add_skip_large_files(self):
244
"""Test skipping files larger than add.maximum_file_size"""
245
tree = self.make_branch_and_tree('.')
246
self.build_tree(['small.txt', 'big.txt', 'big2.txt'])
247
self.build_tree_contents([('small.txt', '0\n')])
248
self.build_tree_contents([('big.txt', '01234567890123456789\n')])
249
self.build_tree_contents([('big2.txt', '01234567890123456789\n')])
250
tree.branch.get_config().set_user_option('add.maximum_file_size', 5)
251
out = self.run_bzr('add')[0]
252
results = sorted(out.rstrip('\n').split('\n'))
253
self.assertEquals(['adding small.txt'],
255
# named items never skipped, even if over max
256
out, err = self.run_bzr(["add", "big2.txt"])
257
results = sorted(out.rstrip('\n').split('\n'))
258
self.assertEquals(['adding big2.txt'],
260
self.assertEquals(err, "")
261
tree.branch.get_config().set_user_option('add.maximum_file_size', 30)
262
out = self.run_bzr('add')[0]
263
results = sorted(out.rstrip('\n').split('\n'))
264
self.assertEquals(['adding big.txt'],