104
104
self.assertRaises(errors.PublicBranchOutOfDate,
105
105
merge_directive.MergeDirective.from_objects,
106
106
tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,
107
public_branch=branch_c.base, patch_type='diff')
108
# public branch is not checked if patch format is bundle.
109
md1 = merge_directive.MergeDirective.from_objects(
110
tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,
107
111
public_branch=branch_c.base)
108
md1 = merge_directive.MergeDirective.from_objects(
109
tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base)
110
112
self.assertContainsRe(md1.patch, 'Bazaar revision bundle')
111
113
self.assertContainsRe(md1.patch, '\\+content_c')
112
114
self.assertNotContainsRe(md1.patch, '\\+content_a')
115
# public branch is provided with a bundle, despite possibly being out
116
# of date, because it's not required if a bundle is present.
117
self.assertEqual(md1.source_branch, branch_c.base)
113
118
branch_c.pull(tree_a.branch)
114
119
md2 = merge_directive.MergeDirective.from_objects(
115
120
tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,