~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-01-21 00:19:09 UTC
  • mfrom: (5616.6.3 tag-conflict-return-code)
  • Revision ID: pqm@pqm.ubuntu.com-20110121001909-0t7a81zk94edbp0u
(jelmer) Exit with 1 if there were tag conflicts during 'bzr pull'. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
        self.run_bzr('pull -r 4')
143
143
        self.assertEqual(a.revision_history(), b.revision_history())
144
144
 
145
 
 
146
145
    def test_overwrite_uptodate(self):
147
146
        # Make sure pull --overwrite overwrites
148
147
        # even if the target branch has merged
495
494
        self.assertEqual(out,
496
495
                         ('','bzr: ERROR: Need working tree for --show-base.\n'))
497
496
 
498
 
 
 
497
    def test_pull_tag_conflicts(self):
 
498
        """pulling tags with conflicts will change the exit code"""
 
499
        # create a branch, see that --show-base fails
 
500
        from_tree = self.make_branch_and_tree('from')
 
501
        from_tree.branch.tags.set_tag("mytag", "somerevid")
 
502
        to_tree = self.make_branch_and_tree('to')
 
503
        to_tree.branch.tags.set_tag("mytag", "anotherrevid")
 
504
        out = self.run_bzr(['pull','-d','to','from'],retcode=1)
 
505
        self.assertEqual(out,
 
506
            ('No revisions to pull.\nConflicting tags:\n    mytag\n', ''))