~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ftp.py

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    )
47
47
from bzrlib.trace import mutter, warning
48
48
from bzrlib.transport import (
 
49
    AppendBasedFileStream,
49
50
    _file_streams,
50
51
    Server,
51
52
    ConnectedTransport,
323
324
            self._translate_perm_error(e, abspath,
324
325
                unknown_exc=errors.FileExists)
325
326
 
326
 
    def open_file_stream(self, relpath):
327
 
        """See Transport.open_file_stream."""
328
 
        def append_data(bytes):
329
 
            self.append_bytes(relpath, bytes)
330
 
        self.put_bytes(relpath, "")
331
 
        _file_streams[self.abspath(relpath)] = append_data
332
 
        return append_data
 
327
    def open_write_stream(self, relpath, mode=None):
 
328
        """See Transport.open_write_stream."""
 
329
        self.put_bytes(relpath, "", mode)
 
330
        result = AppendBasedFileStream(self, relpath)
 
331
        _file_streams[self.abspath(relpath)] = result
 
332
        return result
333
333
 
334
334
    def recommended_page_size(self):
335
335
        """See Transport.recommended_page_size().