~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-04-16 11:08:11 UTC
  • mfrom: (6521 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6522.
  • Revision ID: jelmer@samba.org-20120416110811-0y996ihqy9o2bb1t
Merge bzr.dev.

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')
 
258
 
 
259
            out, err = self.run_bzr(
 
260
                'missing --log-format={0} ../b'.format(log_format),
 
261
                working_dir='a', retcode=1)
 
262
            self.assertContainsString(out, 'a-tag')