You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/07/12 11:20:10 UTC

svn commit: r1145505 - /subversion/trunk/subversion/libsvn_client/patch.c

Author: rhuijben
Date: Tue Jul 12 09:20:10 2011
New Revision: 1145505

URL: http://svn.apache.org/viewvc?rev=1145505&view=rev
Log:
* subversion/libsvn_client/patch.c
  (install_patched_target): Just create a stream directly instead of wrapping an apr
    file and then wrapping it.

Modified:
    subversion/trunk/subversion/libsvn_client/patch.c

Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=1145505&r1=1145504&r2=1145505&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Tue Jul 12 09:20:10 2011
@@ -2333,20 +2333,15 @@ install_patched_target(patch_target_t *t
             {
               svn_stream_t *stream;
               svn_stream_t *patched_stream;
-              apr_file_t *file;
 
-              SVN_ERR(svn_io_file_open(&file, target->patched_path,
-                                       APR_READ | APR_BINARY, APR_OS_DEFAULT,
-                                       pool));
-
-              patched_stream = svn_stream_from_aprfile2(file, FALSE /* disown */,
-                                                pool);
+              SVN_ERR(svn_stream_open_readonly(&patched_stream,
+                                               target->patched_path,
+                                               pool, pool));
               SVN_ERR(svn_subst_create_specialfile(&stream,
                                                    target->local_abspath,
                                                    pool, pool));
               SVN_ERR(svn_stream_copy3(patched_stream, stream,
-                                       NULL, /* cancel_func */
-                                       NULL, /* cancel_baton */
+                                       ctx->cancel_func, ctx->cancel_baton,
                                        pool));
             }
           else