/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-25 03:06:42 UTC
  • mfrom: (7045.3.4 python3-r)
  • Revision ID: breezy.the.bot@gmail.com-20180725030642-oghhedvui3470wy6
Fix another ~500 tests on Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-r/+merge/350430

Show diffs side-by-side

added added

removed removed

Lines of Context:
517
517
        """pulling tags with conflicts will change the exit code"""
518
518
        # create a branch, see that --show-base fails
519
519
        from_tree = self.make_branch_and_tree('from')
520
 
        from_tree.branch.tags.set_tag("mytag", "somerevid")
 
520
        from_tree.branch.tags.set_tag("mytag", b"somerevid")
521
521
        to_tree = self.make_branch_and_tree('to')
522
 
        to_tree.branch.tags.set_tag("mytag", "anotherrevid")
 
522
        to_tree.branch.tags.set_tag("mytag", b"anotherrevid")
523
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', ''))
528
528
        """pulling tags with conflicts will change the exit code"""
529
529
        # create a branch, see that --show-base fails
530
530
        from_tree = self.make_branch_and_tree('from')
531
 
        from_tree.branch.tags.set_tag("mytag", "somerevid")
 
531
        from_tree.branch.tags.set_tag("mytag", b"somerevid")
532
532
        to_tree = self.make_branch_and_tree('to')
533
533
        out = self.run_bzr(['pull', '-d', 'to', 'from'])
534
534
        self.assertEqual(out,
537
537
    def test_overwrite_tags(self):
538
538
        """--overwrite-tags only overwrites tags, not revisions."""
539
539
        from_tree = self.make_branch_and_tree('from')
540
 
        from_tree.branch.tags.set_tag("mytag", "somerevid")
 
540
        from_tree.branch.tags.set_tag("mytag", b"somerevid")
541
541
        to_tree = self.make_branch_and_tree('to')
542
 
        to_tree.branch.tags.set_tag("mytag", "anotherrevid")
 
542
        to_tree.branch.tags.set_tag("mytag", b"anotherrevid")
543
543
        revid1 = to_tree.commit('my commit')
544
544
        out = self.run_bzr(['pull', '-d', 'to', 'from'], retcode=1)
545
545
        self.assertEqual(out,
548
548
        self.assertEqual(out, ('1 tag(s) updated.\n', ''))
549
549
 
550
550
        self.assertEqual(to_tree.branch.tags.lookup_tag('mytag'),
551
 
                          'somerevid')
 
551
                          b'somerevid')
552
552
        self.assertEqual(to_tree.branch.last_revision(), revid1)
553
553
 
554
554
    def test_pull_tag_overwrite(self):
555
555
        """pulling tags with --overwrite only reports changed tags."""
556
556
        # create a branch, see that --show-base fails
557
557
        from_tree = self.make_branch_and_tree('from')
558
 
        from_tree.branch.tags.set_tag("mytag", "somerevid")
 
558
        from_tree.branch.tags.set_tag("mytag", b"somerevid")
559
559
        to_tree = self.make_branch_and_tree('to')
560
 
        to_tree.branch.tags.set_tag("mytag", "somerevid")
 
560
        to_tree.branch.tags.set_tag("mytag", b"somerevid")
561
561
        out = self.run_bzr(['pull', '--overwrite', '-d', 'to', 'from'])
562
562
        self.assertEqual(out,
563
563
            ('No revisions or tags to pull.\n', ''))