238
238
self.run_bzr_error(['Bad value .* for option .format.'],
239
239
'send -f branch -o- --format=0.999')[0]
241
def test_format_child_option(self):
243
parent = _mod_branch.Branch.open('parent')
244
parent.get_config().set_user_option('child_submit_format', '4')
245
s = StringIO(self.run_bzr('send -f branch -o-')[0])
246
md = merge_directive.MergeDirective.from_lines(s.readlines())
247
self.assertIs(merge_directive.MergeDirective2, md.__class__)
248
parent.get_config().set_user_option('child_submit_format', '0.9')
249
s = StringIO(self.run_bzr('send -f branch -o-')[0])
250
md = merge_directive.MergeDirective.from_lines(s.readlines())
251
self.assertContainsRe(md.get_raw_bundle().splitlines()[0],
252
'# Bazaar revision bundle v0.9')
253
s = StringIO(self.run_bzr('bundle -f branch -o-')[0])
254
md = merge_directive.MergeDirective.from_lines(s.readlines())
255
self.assertContainsRe(md.get_raw_bundle().splitlines()[0],
256
'# Bazaar revision bundle v0.9')
257
self.assertIs(merge_directive.MergeDirective, md.__class__)
258
parent.get_config().set_user_option('child_submit_format', '0.999')
259
self.run_bzr_error(["No such send format '0.999'"],
260
'send -f branch -o-')[0]
241
262
def test_message_option(self):
242
263
self.make_trees()
243
264
self.run_bzr('send', retcode=3)