/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/bundle/commands.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
from __future__ import absolute_import
25
25
 
26
 
from cStringIO import StringIO
27
 
 
28
 
from bzrlib.lazy_import import lazy_import
 
26
from ..lazy_import import lazy_import
29
27
lazy_import(globals(), """
30
 
from bzrlib import (
 
28
from breezy import (
31
29
    branch,
32
30
    errors,
33
31
    merge_directive,
35
33
    urlutils,
36
34
    transport,
37
35
    )
38
 
from bzrlib.i18n import gettext
 
36
from breezy.i18n import gettext
39
37
""")
40
38
 
41
 
from bzrlib.commands import Command
 
39
from ..commands import Command
 
40
from ..sixish import (
 
41
    BytesIO,
 
42
    )
42
43
 
43
44
 
44
45
class cmd_bundle_info(Command):
50
51
    encoding_type = 'exact'
51
52
 
52
53
    def run(self, location, verbose=False):
53
 
        from bzrlib.bundle.serializer import read_bundle
54
 
        from bzrlib.bundle import read_mergeable_from_url
55
 
        from bzrlib import osutils
 
54
        from breezy.bundle.serializer import read_bundle
 
55
        from breezy.bundle import read_mergeable_from_url
 
56
        from breezy import osutils
56
57
        term_encoding = osutils.get_terminal_encoding()
57
58
        bundle_info = read_mergeable_from_url(location)
58
59
        if isinstance(bundle_info, merge_directive.BaseMergeDirective):
59
 
            bundle_file = StringIO(bundle_info.get_raw_bundle())
 
60
            bundle_file = BytesIO(bundle_info.get_raw_bundle())
60
61
            bundle_info = read_bundle(bundle_file)
61
62
        else:
62
63
            if verbose: