~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_merge.py

Remove usage of tree.pending_merges().

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
        file('hello', 'wt').write('quuux')
63
63
        # We can't merge when there are in-tree changes
64
64
        self.runbzr('merge ../b', retcode=3)
65
 
        self.runbzr(['commit', '-m', "Like an epidemic of u's"])
 
65
        a = WorkingTree.open('.')
 
66
        a_tip = a.commit("Like an epidemic of u's")
66
67
        self.runbzr('merge ../b -r last:1..last:1 --merge-type blooof',
67
68
                    retcode=3)
68
69
        self.runbzr('merge ../b -r last:1..last:1 --merge-type merge3')
74
75
        self.runbzr('merge ../b -r last:1')
75
76
        self.check_file_contents('goodbye', 'quux')
76
77
        # Merging a branch pulls its revision into the tree
77
 
        a = WorkingTree.open('.')
78
78
        b = Branch.open('../b')
79
 
        a.branch.repository.get_revision_xml(b.last_revision())
80
 
        self.log('pending merges: %s', a.pending_merges())
81
 
        self.assertEquals(a.pending_merges(),
82
 
                          [b.last_revision()])
83
 
        self.runbzr('commit -m merged')
 
79
        b_tip = b.last_revision()
 
80
        self.failUnless(a.branch.repository.has_revision(b_tip))
 
81
        self.assertEqual([a_tip, b_tip], a.get_parent_ids())
 
82
        a_tip = a.commit('merged')
84
83
        self.runbzr('merge ../b -r last:1')
85
 
        self.assertEqual(a.pending_merges(), [])
 
84
        self.assertEqual([a_tip], a.get_parent_ids())
86
85
 
87
86
    def test_merge_with_missing_file(self):
88
87
        """Merge handles missing file conflicts"""