~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2012-07-23 17:56:45 UTC
  • mfrom: (6538.1.34 branch-store)
  • Revision ID: pqm@pqm.ubuntu.com-20120723175645-92crzj8j7bfnuglm
(abentley) switch --store stores uncommitted changes in branch (Aaron
 Bentley)

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