~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
    self.assertEquals(revisions_2[-1], 'b@u-0-4')
73
74
    
74
 
    br1.fetch(br2)
75
 
    tree1.add_pending_merge(revisions_2[4])
76
 
    self.assertEquals(revisions_2[4], 'b@u-0-4')
 
75
    self.merge(br2, tree1)
77
76
    tree1.commit("Commit six", rev_id="a@u-0-3")
78
77
    tree1.commit("Commit seven", rev_id="a@u-0-4")
79
78
    tree2.commit("Commit eight", rev_id="b@u-0-5")
 
79
    self.assertEquals(br2.revision_history()[-1], 'b@u-0-5')
80
80
    
81
 
    br1.fetch(br2)
82
 
    tree1.add_pending_merge(br2.revision_history()[5])
 
81
    self.merge(br2, tree1)
83
82
    tree1.commit("Commit nine", rev_id="a@u-0-5")
84
 
    # DO NOT FETCH HERE - we WANT a GHOST.
85
 
    # br2.fetch(br1)
86
 
    tree2.add_pending_merge(br1.revision_history()[4])
 
83
    # DO NOT MERGE HERE - we WANT a GHOST.
 
84
    tree2.add_parent_tree_id(br1.revision_history()[4])
87
85
    tree2.commit("Commit ten - ghost merge", rev_id="b@u-0-6")
88
86
    
89
87
    return br1, br2
158
156
        wt2.commit("Commit twelve", rev_id="b@u-0-8")
159
157
        wt2.commit("Commit thirtteen", rev_id="b@u-0-9")
160
158
 
161
 
        self.br1.fetch(self.br2)
162
 
        wt1.add_pending_merge(self.br2.revision_history()[6])
 
159
        self.merge(self.br2, wt1)
163
160
        wt1.commit("Commit fourtten", rev_id="a@u-0-6")
164
161
 
165
 
        self.br2.fetch(self.br1)
166
 
        wt2.add_pending_merge(self.br1.revision_history()[6])
 
162
        self.merge(self.br1, wt2)
167
163
        wt2.commit("Commit fifteen", rev_id="b@u-0-10")
168
164
 
169
165
        from bzrlib.revision import MultipleRevisionSources
291
287
        # in repo 2, which has A, the revision_graph()
292
288
        # should return A and B both.
293
289
        tree_1 = self.make_branch_and_tree('1')
294
 
        tree_1.add_pending_merge('A')
 
290
        tree_1.set_parent_ids(['A'], allow_leftmost_as_ghost=True)
295
291
        tree_1.commit('foo', rev_id='B', allow_pointless=True)
296
292
        tree_2 = self.make_branch_and_tree('2')
297
293
        tree_2.commit('bar', rev_id='A', allow_pointless=True)