~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(gz) Warn rather than erroring if pull --show-base is used without a tree
 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
501
501
                             'fee>>>>>>> MERGE-SOURCE\n',
502
502
                             open(osutils.pathjoin('b', 'hello')).read())
503
503
 
504
 
    def test_pull_show_base_working_tree_only(self):
505
 
        """--show-base only allowed if there's a working tree
 
504
    def test_pull_warns_about_show_base_when_no_working_tree(self):
 
505
        """--show-base is useless if there's no working tree
506
506
 
507
 
        see https://bugs.launchpad.net/bzr/+bug/202374"""
508
 
        # create a branch, see that --show-base fails
 
507
        see https://bugs.launchpad.net/bzr/+bug/1022160"""
509
508
        self.make_branch('from')
510
509
        self.make_branch('to')
511
 
        out=self.run_bzr(['pull','-d','to','from','--show-base'],retcode=3)
512
 
        self.assertEqual(
513
 
            out, ('','bzr: ERROR: Need working tree for --show-base.\n'))
 
510
        out = self.run_bzr(['pull','-d','to','from','--show-base'])
 
511
        self.assertEqual(out, ('No revisions or tags to pull.\n',
 
512
                               'No working tree, ignoring --show-base\n'))
514
513
 
515
514
    def test_pull_tag_conflicts(self):
516
515
        """pulling tags with conflicts will change the exit code"""