~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

Merge more bzr.dev, addressing some bugs. [still broken]

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        )
55
55
from bzrlib.trace import mutter, warning
56
56
from bzrlib.transport import (
 
57
    FileFileStream,
57
58
    _file_streams,
58
59
    local,
59
60
    register_urlparse_netloc_protocol,
546
547
        """Create a directory at the given path."""
547
548
        self._mkdir(self._remote_path(relpath), mode=mode)
548
549
 
549
 
    def open_file_stream(self, relpath, mode=None):
550
 
        """See Transport.open_file_stream."""
 
550
    def open_write_stream(self, relpath, mode=None):
 
551
        """See Transport.open_write_stream."""
551
552
        # initialise the file to zero-length
552
553
        # this is three round trips, but we don't use this 
553
554
        # api more than once per write_group at the moment so 
566
567
            self._translate_io_exception(e, abspath,
567
568
                                         ': unable to open')
568
569
        _file_streams[self.abspath(relpath)] = handle
569
 
        return handle.write
 
570
        return FileFileStream(self, relpath, handle)
570
571
 
571
572
    def _translate_io_exception(self, e, path, more_info='',
572
573
                                failure_exc=PathError):