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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

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
 
from breezy import (
 
25
from ... import (
27
26
    errors,
28
27
    pyutils,
29
28
    )
30
 
from breezy.diff import internal_diff
31
 
from breezy.revision import NULL_REVISION
 
29
from ...diff import internal_diff
 
30
from ...revision import NULL_REVISION
 
31
from ...sixish import (
 
32
    BytesIO,
 
33
    )
32
34
# For backwards-compatibility
33
 
from breezy.timestamp import unpack_highres_date, format_highres_date
 
35
from ...timestamp import unpack_highres_date, format_highres_date
34
36
 
35
37
 
36
38
# New bundles should try to use this header format
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)