/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/branch.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:
18
18
 
19
19
import bzrlib.bzrdir
20
20
 
21
 
from cStringIO import StringIO
22
 
 
23
21
from bzrlib.lazy_import import lazy_import
24
22
lazy_import(globals(), """
25
23
import itertools
56
54
from bzrlib import (
57
55
    bzrdir,
58
56
    controldir,
 
57
    registry,
59
58
    )
60
59
from bzrlib.decorators import (
61
60
    needs_read_lock,
65
64
from bzrlib.hooks import Hooks
66
65
from bzrlib.inter import InterObject
67
66
from bzrlib.lock import _RelockDebugMixin, LogicalLockResult
68
 
from bzrlib import registry
 
67
from bzrlib.sixish import (
 
68
    BytesIO,
 
69
    )
69
70
from bzrlib.symbol_versioning import (
70
71
    deprecated_in,
71
72
    deprecated_method,
2425
2426
            return
2426
2427
        if branch._transport.has('stored-transform'):
2427
2428
            raise errors.ChangesAlreadyStored
2428
 
        transform = StringIO()
 
2429
        transform = BytesIO()
2429
2430
        creator.write_shelf(transform)
2430
2431
        transform.seek(0)
2431
2432
        branch._transport.put_file('stored-transform', transform)
2749
2750
 
2750
2751
        :param info_dict: A dict of {file_id: (tree_path, branch_location)}
2751
2752
        """
2752
 
        s = StringIO()
 
2753
        s = BytesIO()
2753
2754
        writer = rio.RioWriter(s)
2754
2755
        for key, (tree_path, branch_location) in info_dict.iteritems():
2755
2756
            stanza = rio.Stanza(file_id=key, tree_path=tree_path,