23
23
md = merge_directive.MergeDirective('null:', 'sha', time, timezone,
24
24
'http://example.com', patch='blah', patch_type='bundle')
25
25
self.assertRaises(errors.PatchMissing, merge_directive.MergeDirective,
26
'example:', 'http://example.com', 'sha', time, timezone,
26
'example:', 'sha', time, timezone, 'http://example.com',
27
27
public_location="http://example.org", patch_type='diff')
28
28
md = merge_directive.MergeDirective('example:', 'sha1', time, timezone,
29
29
'http://example.com', public_location="http://example.org",
67
67
tree_a.branch.repository, 'rev2a', 500, 120, tree_b.branch.base,
68
68
public_branch=branch_c)
69
69
md1 = merge_directive.MergeDirective.from_objects(
70
tree_a.branch.repository, 'rev2a', 500, 120, tree_b.branch.base)
70
tree_a.branch.repository, 'rev2a', 500.0, 120, tree_b.branch.base)
71
71
self.assertContainsRe(md1.patch, 'Bazaar revision bundle')
72
72
self.assertContainsRe(md1.patch, '\\+content_c')
73
73
self.assertNotContainsRe(md1.patch, '\\+content_a')
74
74
branch_c.pull(tree_a.branch)
75
75
md2 = merge_directive.MergeDirective.from_objects(
76
tree_a.branch.repository, 'rev2a', 500, 120, tree_b.branch.base,
76
tree_a.branch.repository, 'rev2a', 500.0, 120, tree_b.branch.base,
77
77
patch_type='diff', public_branch=branch_c)
78
78
self.assertNotContainsRe(md2.patch, 'Bazaar revision bundle')
79
79
self.assertContainsRe(md1.patch, '\\+content_c')
80
80
self.assertNotContainsRe(md1.patch, '\\+content_a')
81
81
md3 = merge_directive.MergeDirective.from_objects(
82
tree_a.branch.repository, 'rev2a', 500, 120, tree_b.branch.base,
82
tree_a.branch.repository, 'rev2a', 500.0, 120, tree_b.branch.base,
83
83
patch_type=None, public_branch=branch_c)
84
84
self.assertIs(None, md3.patch)