61
61
tree1 = self.make_branch_and_tree("branch1", format=format)
64
64
tree1.commit("Commit one", rev_id="a@u-0-0")
65
65
tree1.commit("Commit two", rev_id="a@u-0-1")
66
66
tree1.commit("Commit three", rev_id="a@u-0-2")
68
tree2 = tree1.bzrdir.clone("branch2").open_workingtree()
68
tree2 = tree1.bzrdir.sprout("branch2").open_workingtree()
70
70
tree2.commit("Commit four", rev_id="b@u-0-3")
71
71
tree2.commit("Commit five", rev_id="b@u-0-4")
72
72
revisions_2 = br2.revision_history()
73
73
self.assertEquals(revisions_2[-1], 'b@u-0-4')
75
75
tree1.merge_from_branch(br2)
76
76
tree1.commit("Commit six", rev_id="a@u-0-3")
77
77
tree1.commit("Commit seven", rev_id="a@u-0-4")
78
78
tree2.commit("Commit eight", rev_id="b@u-0-5")
79
79
self.assertEquals(br2.revision_history()[-1], 'b@u-0-5')
81
81
tree1.merge_from_branch(br2)
82
82
tree1.commit("Commit nine", rev_id="a@u-0-5")
83
83
# DO NOT MERGE HERE - we WANT a GHOST.
84
84
tree2.add_parent_tree_id(br1.revision_history()[4])
85
85
tree2.commit("Commit ten - ghost merge", rev_id="b@u-0-6")