- changed 4 files
Stream svndiff deltas without creating temporary files during 'svn commit'over HTTP.Creating the temporary files has a certain overhead (time to write themand disk space), but what is more important, it prevents the client andserver from simultaneously processing the data, i.e., checksumming andcompressing it. See the log message to r1803144 for additional detailson this.Technically, in order to do this, we use the new apply_textdelta_stream()delta editor callback for the wc commit. In order to do that, we needto make some of the used streams (mostly, with associated temporary fileson disk) properly support svn_stream_reset().* subversion/include/private/svn_io_private.h (svn_stream__from_aprfile): Declare this new function.* subversion/libsvn_subr/stream.c (struct baton_apr): Add new 'truncate_on_seek' field. (make_stream_from_apr_file): Accept a new 'truncate_on_seek' argument, which we'd need to properly reset streams over temporary files. (seek_handler_apr): Honor the new 'truncate_on_seek' field. (svn_stream__from_aprfile): Implement by forwarding the arguments to make_stream_from_apr_file(). (svn_stream_from_aprfile2, svn_stream_for_stdin2, svn_stream_for_stdout svn_stream_for_stderr): Update calls to make_stream_from_apr_file(), don't change the existing behavior. (svn_stream__create_for_install): Set the temporary file to be truncated on seeks.* subversion/libsvn_wc/adm_crawler.c (seek_handler_copy): New function. (copying_stream): Implement reset support in this stream. (open_txdelta_stream_baton_t): New. (open_txdelta_stream): New, implements svn_txdelta_stream_open_func_t. Note that this function must be restartable, as it can be called more than once, for example, if the HTTP server decides to do a renegotiation, and we would be forced to resend the whole request body. If this is the case, we reset the streams and continue. (svn_wc__internal_transmit_text_deltas): Use the new apply_textdelta_stream() delta editor callback. Calculate the MD5 checksum with the help of svn_stream_checksummed2() stream. Pass the disowned streams to the open txdelta callback.* subversion/libsvn_wc/deprecated.c (): Include svn_io_private.h. (svn_wc_transmit_text_deltas2): Set the temporary file to be truncated on seeks.