On 28 April 2015 at 18:32, Philip Martin <philip.mar...@wandisco.com> wrote:
> Ivan Zhakov <i...@visualsvn.com> writes:
>
>>>>    SVN_ERR(svn_stream__create_for_install(&stream, deep_dir, pool, pool));
>>>>    SVN_ERR(svn_stream_puts(stream, "stream1 content"));
>>>> +  SVN_ERR(svn_stream_close(stream));
>>>>    SVN_ERR(svn_stream__install_stream(stream,
>>>>                                       final_abspath,
>>>>                                       TRUE,
>>>
>>>
>>> Um, surely that can't be right? Using the stream after it's been closed?
>>>
>> I'm also find this behavior a little bit confusing, but this is how it
>> works now: install_stream should be closed before installing. Windows
>> implementation perform flush on close, while unix implementation
>> closes the file handle. The current callers (run_file_install in
>> workqueue.c:587) also closes install_stream before installing it.
>
> While svn_stream__install_stream doesn't explicitly document that a
> closed stream can be passed it is part of the documentation for
> svn_stream__install_get_info.
>
> The documentation for svn_stream__create_for_install appears to have got
> mangled:
>
>    Creates as *INSTALL_STREAM a stream that once completed can be installed
>    using Windows checkouts much slower than Unix.
>
> What does "can be installed using Windows checkouts much slower than
> Unix" mean?
>
I have no idea. This function was added in r1559758 [1] as preparation
to fix issue #4450 "Windows checkouts much slower then Unix" [2]. May
issue summary leaked to function docstring for some reason.

[1] https://svn.apache.org/r1559758
[2] http://subversion.tigris.org/issues/show_bug.cgi?id=4450

-- 
Ivan Zhakov

Reply via email to