~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/upstream_import.py

  • Committer: Aaron Bentley
  • Date: 2011-07-13 19:35:00 UTC
  • Revision ID: aaron@aaronbentley.com-20110713193500-0kmt59py3tnoopv6
Fix compatibility with bzr 2.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    transform
12
12
    )
13
13
from bzrlib.bzrdir import BzrDir
14
 
from bzrlib.export.tar_exporter import export_tarball
 
14
from bzrlib.export import export
15
15
from bzrlib.plugins.bzrtools import errors
16
16
from bzrlib.plugins.bzrtools.upstream_import import (
17
17
    common_directory,
274
274
 
275
275
    def transform_to_tar(self, tt):
276
276
        stream = StringIO()
277
 
        tarball = tarfile.open(None, 'w|', stream)
278
 
        export_tarball(tt.get_preview_tree(), tarball, '')
 
277
        export(tt.get_preview_tree(), root='', fileobj=stream, format='tar',
 
278
               dest=None)
279
279
        return stream
280
280
 
281
281
    def get_empty_tt(self):