/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/tests/per_branch/test_push.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:
16
16
 
17
17
"""Tests for branch.push behaviour."""
18
18
 
19
 
from cStringIO import StringIO
20
19
import os
21
20
 
22
 
from bzrlib import (
 
21
from ... import (
23
22
    branch,
24
23
    builtins,
25
24
    controldir,
32
31
    tests,
33
32
    transport,
34
33
    )
35
 
from bzrlib.smart import (
 
34
from ...sixish import (
 
35
    BytesIO,
 
36
    )
 
37
from ...smart import (
36
38
    client,
37
39
    )
38
 
from bzrlib.tests import (
 
40
from .. import (
39
41
    per_branch,
40
42
    test_server,
41
43
    )
287
289
        # stack on trunk.
288
290
        self.make_bzrdir('.').get_config().set_default_stack_on('trunk')
289
291
        # Push rev-2 to a new branch "remote".  It will be stacked on "trunk".
290
 
        output = StringIO()
 
292
        output = BytesIO()
291
293
        push._show_push_branch(trunk, 'rev-2', self.get_url('remote'), output)
292
294
        # Push rev-3 onto "remote".  If "remote" not stacked and is missing the
293
295
        # fulltext record for f-id @ rev-1, then this will fail.
438
440
        """The 'bzr push' command should make a limited number of HPSS calls.
439
441
        """
440
442
        cmd = builtins.cmd_push()
441
 
        cmd.outf = tests.StringIOWrapper()
 
443
        cmd.outf = BytesIO()
442
444
        cmd.run(
443
445
            directory=self.get_url('empty'),
444
446
            location=self.smart_server.get_url() + 'target')