/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_status.py

Alter set_pending_merges to shove the left most merge into the trees last-revision if that is not set. Related bugfixes include basis_tree handling ghosts, de-duping the merges with the last-revision and update changing where and how it adds its pending merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    def test_pending_none(self):
28
28
        # Test whether show_pending_merges works in a tree with no commits
29
29
        tree = self.make_branch_and_tree('a')
30
 
        tree.commit('empty commit')
 
30
        rev_id = tree.commit('empty commit')
31
31
        tree2 = self.make_branch_and_tree('b')
32
32
        tree2.branch.fetch(tree.branch)
33
 
        tree2.set_pending_merges([tree.last_revision()])
 
33
        tree2.set_pending_merges(['some-ghost', rev_id])
34
34
        output = StringIO()
35
35
        show_pending_merges(tree2, output)
36
36
        self.assertContainsRe(output.getvalue(), 'empty commit')