/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 bzrlib/bundle/serializer/__init__.py

  • Committer: Martin
  • Date: 2017-05-21 18:16:32 UTC
  • mto: (6621.2.22 py3)
  • mto: This revision was merged to the branch mainline in revision 6624.
  • Revision ID: gzlist@googlemail.com-20170521181632-kll0wqnsq8pipfpj
Use BytesIO or StringIO from bzrlib.sixish

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from __future__ import absolute_import
21
21
 
22
22
import base64
23
 
from StringIO import StringIO
24
23
import re
25
24
 
26
25
from bzrlib import (
29
28
    )
30
29
from bzrlib.diff import internal_diff
31
30
from bzrlib.revision import NULL_REVISION
 
31
from bzrlib.sixish import (
 
32
    BytesIO,
 
33
    )
32
34
# For backwards-compatibility
33
35
from bzrlib.timestamp import unpack_highres_date, format_highres_date
34
36
 
201
203
 
202
204
 
203
205
def binary_diff(old_filename, old_lines, new_filename, new_lines, to_file):
204
 
    temp = StringIO()
 
206
    temp = BytesIO()
205
207
    internal_diff(old_filename, old_lines, new_filename, new_lines, temp,
206
208
                  allow_binary=True)
207
209
    temp.seek(0)