/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_switch.py

  • Committer: Jelmer Vernooij
  • Date: 2019-05-29 03:28:14 UTC
  • mfrom: (7303 work)
  • mto: This revision was merged to the branch mainline in revision 7305.
  • Revision ID: jelmer@jelmer.uk-20190529032814-fzqbrgf9647u9ptq
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
        os.chdir('checkout')
56
56
        out, err = self.run_bzr('switch ../branch2')
57
57
        self.assertContainsRe(err, 'Tree is up to date at revision 0.\n')
58
 
        self.assertContainsRe(err, 'Switched to branch: .*/branch2.\n')
 
58
        self.assertContainsRe(err, 'Switched to branch at .*/branch2.\n')
59
59
        self.assertEqual('', out)
60
60
 
61
61
    def test_switch_out_of_date_light_checkout(self):
69
69
        out, err = self.run_bzr('switch ../branch2')
70
70
        #self.assertContainsRe(err, '\+N  file')
71
71
        self.assertContainsRe(err, 'Updated to revision 1.\n')
72
 
        self.assertContainsRe(err, 'Switched to branch: .*/branch2.\n')
 
72
        self.assertContainsRe(err, 'Switched to branch at .*/branch2.\n')
73
73
        self.assertEqual('', out)
74
74
 
75
75
    def _test_switch_nick(self, lightweight):
347
347
        tree = branch.create_checkout('tree', lightweight=True)
348
348
 
349
349
        class FooLookup(object):
350
 
            def look_up(self, name, url):
 
350
            def look_up(self, name, url, purpose=None):
351
351
                return 'foo-' + name
352
352
        directories.register('foo:', FooLookup, 'Create branches named foo-')
353
353
        self.addCleanup(directories.remove, 'foo:')
431
431
                $ cd checkout
432
432
                $ brz switch --create-branch switched
433
433
                2>Tree is up to date at revision 0.
434
 
                2>Switched to branch:...switched...
 
434
                2>Switched to branch at .../switched/
435
435
                $ cd ..
436
436
                ''' % locals())
437
437
        bound_branch = branch.Branch.open_containing('checkout')[0]
576
576
            $ mv mywork mywork1
577
577
            $ cd mywork1
578
578
            $ brz branches
579
 
            * br1
 
579
              br1
580
580
            ''', null_output_matches_anything=True)
581
581
 
582
582
    def test_switch_to_new_branch_on_old_rev(self):
590
590
           Created a standalone tree (format: 2a)
591
591
           $ brz switch -b trunk
592
592
           2>Tree is up to date at revision 0.
593
 
           2>Switched to branch:...
 
593
           2>Switched to branch trunk
594
594
           $ brz commit -m 1 --unchanged
595
595
           2>Committing to: ...
596
596
           2>Committed revision 1.
599
599
           2>Committed revision 2.
600
600
           $ brz switch -b blah -r1
601
601
           2>Updated to revision 1.
602
 
           2>Switched to branch:...
 
602
           2>Switched to branch blah
603
603
           $ brz branches
604
604
           * blah
605
605
             trunk