subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r919067 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Date Thu, 04 Mar 2010 17:05:47 GMT
Author: julianfoad
Date: Thu Mar  4 17:05:47 2010
New Revision: 919067

URL: http://svn.apache.org/viewvc?rev=919067&view=rev
Log:
A tiny optimisation: avoid creating an unused stream.

* subversion/libsvn_wc/update_editor.c
  (get_empty_tmp_file): Create just a plain file rather than a file wrapped
    in a stream.

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

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=919067&r1=919066&r2=919067&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Mar  4 17:05:47 2010
@@ -424,14 +424,14 @@
                    apr_pool_t *scratch_pool)
 {
   const char *temp_dir_path;
-  svn_stream_t *empty_stream;
+  apr_file_t *file;
 
   SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&temp_dir_path, db, wri_abspath,
                                          scratch_pool, scratch_pool));
-  SVN_ERR(svn_stream_open_unique(&empty_stream, tmp_filename, temp_dir_path,
-                                 svn_io_file_del_none, result_pool,
-                                 scratch_pool));
-  SVN_ERR(svn_stream_close(empty_stream));
+  SVN_ERR(svn_io_open_unique_file3(&file, tmp_filename, temp_dir_path,
+                                   svn_io_file_del_none,
+                                   result_pool, scratch_pool));
+  SVN_ERR(svn_io_file_close(file, scratch_pool));
 
   return svn_error_return(svn_dirent_get_absolute(tmp_filename, *tmp_filename,
                                                   result_pool));



Mime
View raw message