~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_status.py

(robertc) Alter the pending-merges api so that when the last-revision of a tree is None, the left most pending merge becomes the last-revision.

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')