/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Martin
  • Date: 2017-11-12 13:53:51 UTC
  • mto: This revision was merged to the branch mainline in revision 6810.
  • Revision ID: gzlist@googlemail.com-20171112135351-uyr1ncw7visg62c2
Apply 2to3 ws_comma fixer

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
        # test pull for failure without parent set
245
245
        out = self.run_bzr('pull', retcode=3, working_dir='branch_b')
246
246
        self.assertEqual(out,
247
 
                ('','brz: ERROR: No pull location known or specified.\n'))
 
247
                ('', 'brz: ERROR: No pull location known or specified.\n'))
248
248
        # test implicit --remember when no parent set, this pull conflicts
249
249
        self.build_tree(['branch_b/d'])
250
250
        tree_b.add('d')
252
252
        out = self.run_bzr('pull ../branch_a', retcode=3,
253
253
                           working_dir='branch_b')
254
254
        self.assertEqual(out,
255
 
                ('','brz: ERROR: These branches have diverged.'
 
255
                ('', 'brz: ERROR: These branches have diverged.'
256
256
                    ' Use the missing command to see how.\n'
257
257
                    'Use the merge command to reconcile them.\n'))
258
258
        tree_b = tree_b.controldir.open_workingtree()
483
483
        a_tree = self.example_branch('a')
484
484
        b_tree = a_tree.controldir.sprout('b').open_workingtree()
485
485
 
486
 
        with open(osutils.pathjoin('a', 'hello'),'wt') as f:
 
486
        with open(osutils.pathjoin('a', 'hello'), 'wt') as f:
487
487
            f.write('fee')
488
488
        a_tree.commit('fee')
489
489
 
490
 
        with open(osutils.pathjoin('b', 'hello'),'wt') as f:
 
490
        with open(osutils.pathjoin('b', 'hello'), 'wt') as f:
491
491
            f.write('fie')
492
492
 
493
 
        out,err=self.run_bzr(['pull','-d','b','a','--show-base'])
 
493
        out, err=self.run_bzr(['pull', '-d', 'b', 'a', '--show-base'])
494
494
 
495
495
        # check for message here
496
496
        self.assertEqual(
509
509
        see https://bugs.launchpad.net/bzr/+bug/1022160"""
510
510
        self.make_branch('from')
511
511
        self.make_branch('to')
512
 
        out = self.run_bzr(['pull','-d','to','from','--show-base'])
 
512
        out = self.run_bzr(['pull', '-d', 'to', 'from', '--show-base'])
513
513
        self.assertEqual(out, ('No revisions or tags to pull.\n',
514
514
                               'No working tree, ignoring --show-base\n'))
515
515
 
520
520
        from_tree.branch.tags.set_tag("mytag", "somerevid")
521
521
        to_tree = self.make_branch_and_tree('to')
522
522
        to_tree.branch.tags.set_tag("mytag", "anotherrevid")
523
 
        out = self.run_bzr(['pull','-d','to','from'],retcode=1)
 
523
        out = self.run_bzr(['pull', '-d', 'to', 'from'], retcode=1)
524
524
        self.assertEqual(out,
525
525
            ('No revisions to pull.\nConflicting tags:\n    mytag\n', ''))
526
526