Log Message: |
ra_serf: Add new bucket that wraps a readable svn_stream_t.
This new bucket would be required to make ra_serf stream svndiff deltas
without creating temporary files. (We'll take an svn_txdelta_stream_t,
convert it to a generic svn_stream_t with svn_txdelta_to_svndiff_stream(),
create a bucket around that stream, and use it as the PUT request body.
This change introduces adds the necessary bucket implementation.)
* subversion/include/svn_error_codes.h
(SVN_ERR_RA_SERF_STREAM_BUCKET_READ_ERROR): New.
* subversion/libsvn_ra_serf/ra_serf.h
(svn_ra_serf__stream_bucket_errfunc_t): Declare new callback type.
(svn_ra_serf__create_stream_bucket): Declare new function.
* subversion/libsvn_ra_serf/stream_bucket.c: New file.
(stream_bucket_ctx_t): New.
(svn_ra_serf__create_stream_bucket): New, creates the bucket and
initializes a databuf that would be used in its implementation.
Remember the passed-in errfunc callback to allow reporting extended
error information to the caller in the form of an svn_error_t.
(stream_bucket_read, stream_bucket_readline, stream_bucket_peek):
New bucket vtable members that forward everything to the databuf.
(stream_reader): New. This is the core function of the new bucket that
reads data from the svn_stream_t and possibly forwards the errors
using the stored errfunc callback.
|