/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

1st cut merge of bzr.dev r3907

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
 
48
48
    the object graph is
49
49
    B:     A:
50
 
    a..0   a..0 
 
50
    a..0   a..0
51
51
    a..1   a..1
52
52
    a..2   a..2
53
53
    b..3   a..3 merges b..4
60
60
    """
61
61
    tree1 = self.make_branch_and_tree("branch1", format=format)
62
62
    br1 = tree1.branch
63
 
    
 
63
 
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")
67
67
 
68
 
    tree2 = tree1.bzrdir.clone("branch2").open_workingtree()
 
68
    tree2 = tree1.bzrdir.sprout("branch2").open_workingtree()
69
69
    br2 = tree2.branch
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')
74
 
    
 
74
 
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')
80
 
    
 
80
 
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")
86
 
    
 
86
 
87
87
    return br1, br2
88
88
 
89
89