~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_status.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-06-05 04:05:05 UTC
  • mfrom: (3473.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080605040505-i9kqxg2fps2qjdi0
Add the 'alias' command (Tim Penhey)

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
                     revision=[RevisionSpec.from_string("revid:%s" % r1_id),
113
113
                               RevisionSpec.from_string("revid:%s" % r2_id)])
114
114
        # return does not matter as long as it did not raise.
 
115
 
 
116
    def test_pending_specific_files(self):
 
117
        """With a specific file list, pending merges are not shown."""
 
118
        tree = self.make_branch_and_tree('tree')
 
119
        self.build_tree_contents([('tree/a', 'content of a\n')])
 
120
        tree.add('a')
 
121
        r1_id = tree.commit('one')
 
122
        alt = tree.bzrdir.sprout('alt').open_workingtree()
 
123
        self.build_tree_contents([('alt/a', 'content of a\nfrom alt\n')])
 
124
        alt_id = alt.commit('alt')
 
125
        tree.merge_from_branch(alt.branch)
 
126
        output = StringIO()
 
127
        show_tree_status(tree, to_file=output)
 
128
        self.assertContainsRe(output.getvalue(), 'pending merges:')
 
129
        output = StringIO()
 
130
        show_tree_status(tree, to_file=output, specific_files=['a'])
 
131
        self.assertNotContainsRe(output.getvalue(), 'pending merges:')