/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/plugins/commitfromnews/committemplate.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-15 12:50:24 UTC
  • mfrom: (7027.8.1 python3-commitfromnews)
  • Revision ID: breezy.the.bot@gmail.com-20180715125024-hxy4nuavy3bzobnb
Fix commitfromnews tests on python 3.

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
            _, new_chunks = list(
60
60
                self.commit.builder.repository.iter_files_bytes(
61
61
                    [(found_entry.file_id, found_entry.revision, None)]))[0]
62
 
            content = ''.join(new_chunks)
 
62
            content = b''.join(new_chunks).decode('utf-8')
63
63
            return self.merge_message(content)
64
64
        else:
65
65
            # Get a diff. XXX Is this hookable? I thought it was, can't find it
86
86
                    continue
87
87
                if tag == 'delete':
88
88
                    continue
89
 
                new_lines.extend(new[j1:j2])
 
89
                new_lines.extend([l.decode('utf-8') for l in new[j1:j2]])
90
90
            if not self.commit.revprops.get('bugs'):
91
91
                # TODO: Allow the user to configure the bug tracker to use
92
92
                # rather than hardcoding Launchpad.