[RFC] doing a file-like write adapter for transports.

Robert Collins robertc at robertcollins.net
Thu Aug 2 03:26:32 BST 2007


We currently have a bit of a mismatch in transports and packs. packs
want to write to a file via a callback. transports want all the data at
once.

Now, some transports can sensibly write to a temporary file and rename
when close is called - e.g. SFTP, FTP, Local.

Others can buffer locally on disk and then upload in a stream - e.g.
HTTP+webdav.

Its possible to write an adapter that buffers e.g. 64K of data and then
uses the transport append() method to write data out, but I wonder
whether it would be better to add a put_as_file or similar method to
transport, so that each transport can do what it does best in this
situation.

Thoughts?

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070802/6c06690c/attachment.pgp 


More information about the bazaar mailing list