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 2010/04/14 17:28:20 UTC

svn commit: r933988 - /subversion/trunk/subversion/libsvn_wc/adm_crawler.c

Author: rhuijben
Date: Wed Apr 14 15:28:20 2010
New Revision: 933988

URL: http://svn.apache.org/viewvc?rev=933988&view=rev
Log:
In the spirit of r933975, make the delta calculator of libsvn_wc open
a stream instead of an apr file, when it only needs the stream.

* subversion/libsvn_wc/adm_crawler.c
  (copying_stream): Create a stream instead of wrapping an apr file
    with astream.

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_crawler.c

Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=933988&r1=933987&r2=933988&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Wed Apr 14 15:28:20 2010
@@ -1072,7 +1072,7 @@ svn_wc__internal_transmit_text_deltas(co
    * *TEMPFILE to the path to it. */
   if (tempfile)
     {
-      apr_file_t *tempbasefile;
+      svn_stream_t *tempstream;
 
       SVN_ERR(svn_wc__text_base_path(tempfile, db, local_abspath, TRUE,
                                      scratch_pool));
@@ -1081,19 +1081,14 @@ svn_wc__internal_transmit_text_deltas(co
          administrative tmp area because a) we need to detranslate eol
          and keywords anyway, and b) after the commit, we're going to
          copy the tmp file to become the new text base anyway. */
-      SVN_ERR(svn_io_file_open(&tempbasefile, *tempfile,
-                               APR_WRITE | APR_CREATE, APR_OS_DEFAULT,
-                               result_pool));
+      SVN_ERR(svn_stream_open_writable(&tempstream, *tempfile,
+                                       result_pool, scratch_pool));
 
       /* Wrap the translated stream with a new stream that writes the
          translated contents into the new text base file as we read from it.
          Note that the new text base file will be closed when the new stream
          is closed. */
-      local_stream
-        = copying_stream(local_stream,
-                         svn_stream_from_aprfile2(tempbasefile, FALSE,
-                                                  scratch_pool),
-                         scratch_pool);
+      local_stream = copying_stream(local_stream, tempstream, scratch_pool);
     }
 
   /* Set BASE_STREAM to a stream providing the base (source) content for the