You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2008/10/28 16:36:06 UTC
Re: svn commit: r33929 - trunk/subversion/libsvn_subr
You dropped the comment about getting a cancel func/baton from somewhere...
On Tue, Oct 28, 2008 at 7:19 AM, <hw...@tigris.org> wrote:
> Author: hwright
> Date: Tue Oct 28 07:19:34 2008
> New Revision: 33929
>
> Log:
> * subversion/libsvn_subr/subst.c
> (svn_subst_create_translated): Remove the use of a deprecated API.
>
> Modified:
> trunk/subversion/libsvn_subr/subst.c
>
> Modified: trunk/subversion/libsvn_subr/subst.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/subst.c?pathrev=33929&r1=33928&r2=33929
> ==============================================================================
> --- trunk/subversion/libsvn_subr/subst.c Tue Oct 28 07:03:35 2008 (r33928)
> +++ trunk/subversion/libsvn_subr/subst.c Tue Oct 28 07:19:34 2008 (r33929)
> @@ -1725,18 +1725,17 @@ svn_subst_create_translated(svn_stream_t
> /* The easy way out: no translation needed, just copy. */
> if (! (eol_str || (keywords && (apr_hash_count(keywords) > 0))))
> {
> - /* ### should use copy2() and a cancel func/baton. */
> - SVN_ERR(svn_stream_copy(src_stream, dst_stream, pool));
> + SVN_ERR(svn_stream_copy3(svn_stream_disown(src_stream, pool),
> + dst_stream, NULL, NULL, pool));
> }
> else
> {
> /* Translate src stream into dst stream. */
> SVN_ERR(svn_subst_translate_stream3(src_stream, dst_stream, eol_str,
> repair, keywords, expand, pool));
> + SVN_ERR(svn_stream_close(dst_stream));
> }
>
> - SVN_ERR(svn_stream_close(dst_stream));
> -
> /* Now that dst_tmp contains the translated data, do the atomic rename. */
> return svn_io_file_rename(dst_tmp, dst, pool);
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r33929 - trunk/subversion/libsvn_subr
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Greg Stein wrote:
> You dropped the comment about getting a cancel func/baton from somewhere...
r33942.
> On Tue, Oct 28, 2008 at 7:19 AM, <hw...@tigris.org> wrote:
>> Author: hwright
>> Date: Tue Oct 28 07:19:34 2008
>> New Revision: 33929
>>
>> Log:
>> * subversion/libsvn_subr/subst.c
>> (svn_subst_create_translated): Remove the use of a deprecated API.
>>
>> Modified:
>> trunk/subversion/libsvn_subr/subst.c
>>
>> Modified: trunk/subversion/libsvn_subr/subst.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/subst.c?pathrev=33929&r1=33928&r2=33929
>> ==============================================================================
>> --- trunk/subversion/libsvn_subr/subst.c Tue Oct 28 07:03:35 2008 (r33928)
>> +++ trunk/subversion/libsvn_subr/subst.c Tue Oct 28 07:19:34 2008 (r33929)
>> @@ -1725,18 +1725,17 @@ svn_subst_create_translated(svn_stream_t
>> /* The easy way out: no translation needed, just copy. */
>> if (! (eol_str || (keywords && (apr_hash_count(keywords) > 0))))
>> {
>> - /* ### should use copy2() and a cancel func/baton. */
>> - SVN_ERR(svn_stream_copy(src_stream, dst_stream, pool));
>> + SVN_ERR(svn_stream_copy3(svn_stream_disown(src_stream, pool),
>> + dst_stream, NULL, NULL, pool));
>> }
>> else
>> {
>> /* Translate src stream into dst stream. */
>> SVN_ERR(svn_subst_translate_stream3(src_stream, dst_stream, eol_str,
>> repair, keywords, expand, pool));
>> + SVN_ERR(svn_stream_close(dst_stream));
>> }
>>
>> - SVN_ERR(svn_stream_close(dst_stream));
>> -
>> /* Now that dst_tmp contains the translated data, do the atomic rename. */
>> return svn_io_file_rename(dst_tmp, dst, pool);
>> }