/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: Jelmer Vernooij
  • Date: 2018-06-30 14:28:33 UTC
  • mfrom: (7005 work)
  • mto: This revision was merged to the branch mainline in revision 7008.
  • Revision ID: jelmer@jelmer.uk-20180630142833-eg208wfe8la76m0x
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
class MustSignConfig(config.MemoryStack):
53
53
 
54
54
    def __init__(self):
55
 
        super(MustSignConfig, self).__init__('''
 
55
        super(MustSignConfig, self).__init__(b'''
56
56
create_signatures=always
57
57
''')
58
58
 
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,