~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-06-18 11:43:07 UTC
  • mfrom: (6437.54.10 2.5)
  • mto: This revision was merged to the branch mainline in revision 6525.
  • Revision ID: jelmer@samba.org-20120618114307-zeazlym311p38m98
MergeĀ 2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
533
533
        self.assertEqual(out,
534
534
            ('1 tag(s) updated.\n', ''))
535
535
 
 
536
    def test_overwrite_tags(self):
 
537
        """--overwrite-tags only overwrites tags, not revisions."""
 
538
        from_tree = self.make_branch_and_tree('from')
 
539
        from_tree.branch.tags.set_tag("mytag", "somerevid")
 
540
        to_tree = self.make_branch_and_tree('to')
 
541
        to_tree.branch.tags.set_tag("mytag", "anotherrevid")
 
542
        revid1 = to_tree.commit('my commit')
 
543
        out = self.run_bzr(['pull', '-d', 'to', 'from'], retcode=1)
 
544
        self.assertEquals(out,
 
545
            ('No revisions to pull.\nConflicting tags:\n    mytag\n', ''))
 
546
        out = self.run_bzr(['pull', '-d', 'to', '--overwrite-tags', 'from'])
 
547
        self.assertEquals(out, ('1 tag(s) updated.\n', ''))
 
548
 
 
549
        self.assertEquals(to_tree.branch.tags.lookup_tag('mytag'),
 
550
                          'somerevid')
 
551
        self.assertEquals(to_tree.branch.last_revision(), revid1)
 
552
 
536
553
    def test_pull_tag_overwrite(self):
537
554
        """pulling tags with --overwrite only reports changed tags."""
538
555
        # create a branch, see that --show-base fails