~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_status.py

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
                     revision=[RevisionSpec.from_string("revid:%s" % r1_id),
49
49
                               RevisionSpec.from_string("revid:%s" % r2_id)])
50
50
        # return does not matter as long as it did not raise.
 
51
 
 
52
    def test_pending_specific_files(self):
 
53
        """With a specific file list, pending merges are not shown."""
 
54
        tree = self.make_branch_and_tree('tree')
 
55
        self.build_tree_contents([('tree/a', 'content of a\n')])
 
56
        tree.add('a')
 
57
        r1_id = tree.commit('one')
 
58
        alt = tree.bzrdir.sprout('alt').open_workingtree()
 
59
        self.build_tree_contents([('alt/a', 'content of a\nfrom alt\n')])
 
60
        alt_id = alt.commit('alt')
 
61
        tree.merge_from_branch(alt.branch)
 
62
        output = StringIO()
 
63
        show_tree_status(tree, to_file=output)
 
64
        self.assertContainsRe(output.getvalue(), 'pending merges:')
 
65
        output = StringIO()
 
66
        show_tree_status(tree, to_file=output, specific_files=['a'])
 
67
        self.assertNotContainsRe(output.getvalue(), 'pending merges:')