~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Neil Martinsen-Burrell
  • Date: 2012-04-09 02:53:17 UTC
  • mto: This revision was merged to the branch mainline in revision 6521.
  • Revision ID: nmb@wartburg.edu-20120409025317-xtp7a6kctetx6ioc
Show tag names when using missing command

Show diffs side-by-side

added added

removed removed

Lines of Context:
234
234
        out1, err1 = self.run_bzr('missing ../b', retcode=1, working_dir='a')
235
235
        self.assertEqualDiff(out1, out2)
236
236
        self.assertEqualDiff(err1, err2)
 
237
 
 
238
    def test_missing_tags(self):
 
239
        """Test showing tags"""
 
240
 
 
241
        # create a source branch
 
242
        a_tree = self.make_branch_and_tree('a')
 
243
        self.build_tree_contents([('a/a', 'initial\n')])
 
244
        a_tree.add('a')
 
245
        a_tree.commit(message='initial')
 
246
 
 
247
        # clone and add a differing revision
 
248
        b_tree = a_tree.bzrdir.sprout('b').open_workingtree()
 
249
        self.build_tree_contents([('b/a', 'initial\nmore\n')])
 
250
        b_tree.commit(message='more')
 
251
        b_tree.branch.tags.set_tag('a-tag', b_tree.last_revision())
 
252
 
 
253
        for log_format in ['long', 'short', 'line']:
 
254
            out, err = self.run_bzr(
 
255
                'missing --log-format={0} ../a'.format(log_format),
 
256
                working_dir='b', retcode=1)
 
257
            self.assertContainsString(out, 'a-tag')