~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit_merge.py

Remove usage of tree.pending_merges().

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    def test_merge_commit_empty(self):
35
35
        """Simple commit of two-way merge of empty trees."""
36
36
        wtx = self.make_branch_and_tree('x')
 
37
        base_rev = wtx.commit('common parent')
37
38
        bx = wtx.branch
38
 
        wty = self.make_branch_and_tree('y')
 
39
        wty = wtx.bzrdir.sprout('y').open_workingtree()
39
40
        by = wty.branch
40
 
 
 
41
        
41
42
        wtx.commit('commit one', rev_id='x@u-0-1', allow_pointless=True)
42
43
        wty.commit('commit two', rev_id='y@u-0-1', allow_pointless=True)
43
44
 
50
51
        self.merge(bx, wty)
51
52
        wty.commit('merge from x', rev_id='y@u-0-2', allow_pointless=False)
52
53
 
53
 
        self.assertEquals(by.revno(), 2)
 
54
        self.assertEquals(by.revno(), 3)
54
55
        self.assertEquals(list(by.revision_history()),
55
 
                          ['y@u-0-1', 'y@u-0-2'])
 
56
                          [base_rev, 'y@u-0-1', 'y@u-0-2'])
56
57
        rev = by.repository.get_revision('y@u-0-2')
57
58
        self.assertEquals(rev.parent_ids,
58
59
                          ['y@u-0-1', 'x@u-0-1'])
60
61
    def test_merge_new_file(self):
61
62
        """Commit merge of two trees with no overlapping files."""
62
63
        wtx = self.make_branch_and_tree('x')
 
64
        base_rev = wtx.commit('common parent')
63
65
        bx = wtx.branch
64
 
        wty = self.make_branch_and_tree('y')
 
66
        wty = wtx.bzrdir.sprout('y').open_workingtree()
65
67
        by = wty.branch
66
68
 
67
69
        self.build_tree(['x/ecks', 'y/why'])