/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/test_smart_add.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:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from cStringIO import StringIO
18
 
 
19
 
from bzrlib import (
 
17
from .. import (
20
18
    add,
21
19
    inventory,
22
20
    osutils,
23
21
    tests,
24
22
    )
 
23
from ..sixish import (
 
24
    BytesIO,
 
25
    )
25
26
 
26
27
 
27
28
class AddCustomIDAction(add.AddAction):
54
55
 
55
56
    def add_helper(self, base_tree, base_path, new_tree, file_list,
56
57
                   should_print=False):
57
 
        to_file = StringIO()
 
58
        to_file = BytesIO()
58
59
        base_tree.lock_read()
59
60
        try:
60
61
            new_tree.lock_write()
153
154
 
154
155
    def run_action(self, output):
155
156
        inv = inventory.Inventory()
156
 
        stdout = StringIO()
 
157
        stdout = BytesIO()
157
158
        action = add.AddAction(to_file=stdout, should_print=bool(output))
158
159
 
159
160
        self.apply_redirected(None, stdout, None, action, inv, None,