~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Max Bowsher
  • Date: 2012-08-08 11:44:19 UTC
  • mfrom: (6552 +trunk)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: _@maxb.eu-20120808114419-hes7at3ihv3mwi16
MergeĀ lp:bzr

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