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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-06-30 10:47:22 UTC
  • mfrom: (6973.9.5 python3-h)
  • Revision ID: breezy.the.bot@gmail.com-20180630104722-b2dwuvyepexok616
Fix some more tests on python3.

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
        with open('hello', 'w') as f: f.write('hello')
220
220
        with open('buongia', 'w') as f: f.write('buongia')
221
221
        wt.add(['hello', 'buongia'],
222
 
              ['hello-id', 'buongia-id'])
 
222
              [b'hello-id', b'buongia-id'])
223
223
        wt.commit(message='add files',
224
224
                 rev_id=b'test@rev-1')
225
225
 
428
428
            from ..testament import Testament
429
429
            # monkey patch gpg signing mechanism
430
430
            breezy.gpg.GPGStrategy = breezy.gpg.LoopbackGPGStrategy
431
 
            conf = config.MemoryStack('''
 
431
            conf = config.MemoryStack(b'''
432
432
create_signatures=always
433
433
''')
434
434
            commit.Commit(config_stack=conf).commit(
454
454
        try:
455
455
            # monkey patch gpg signing mechanism
456
456
            breezy.gpg.GPGStrategy = breezy.gpg.DisabledGPGStrategy
457
 
            conf = config.MemoryStack('''
 
457
            conf = config.MemoryStack(b'''
458
458
create_signatures=always
459
459
''')
460
460
            self.assertRaises(breezy.gpg.SigningFailed,
478
478
            calls.append('called')
479
479
        breezy.ahook = called
480
480
        try:
481
 
            conf = config.MemoryStack('post_commit=breezy.ahook breezy.ahook')
 
481
            conf = config.MemoryStack(b'post_commit=breezy.ahook breezy.ahook')
482
482
            commit.Commit(config_stack=conf).commit(
483
483
                message = "base", allow_pointless=True, rev_id=b'A',
484
484
                working_tree = wt)
758
758
        tree = self.make_branch_and_tree('foo')
759
759
        # pending merge would turn into a left parent
760
760
        tree.commit('commit 1')
761
 
        tree.add_parent_tree_id('example')
 
761
        tree.add_parent_tree_id(b'example')
762
762
        self.build_tree(['foo/bar', 'foo/baz'])
763
763
        tree.add(['bar', 'baz'])
764
764
        err = self.assertRaises(CannotCommitSelectedFileMerge,