subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1817416 - /subversion/trunk/subversion/libsvn_client/shelve.c
Date Thu, 07 Dec 2017 20:44:28 GMT
Author: julianfoad
Date: Thu Dec  7 20:44:28 2017
New Revision: 1817416

URL: http://svn.apache.org/viewvc?rev=1817416&view=rev
Log:
* subversion/libsvn_client/shelve.c
  (svn_client_shelf_write_patch): When overwriting an existing file, truncate it.

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

Modified: subversion/trunk/subversion/libsvn_client/shelve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/shelve.c?rev=1817416&r1=1817415&r2=1817416&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/shelve.c (original)
+++ subversion/trunk/subversion/libsvn_client/shelve.c Thu Dec  7 20:44:28 2017
@@ -102,7 +102,7 @@ svn_client_shelf_write_patch(const char
   /* ### svn_stream_open_writable() doesn't work here: the buffering
          goes wrong so that diff headers appear after their hunks.
          For now, fix by opening the file without APR_BUFFERED. */
-  flag = APR_FOPEN_WRITE | APR_FOPEN_CREATE;
+  flag = APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE;
   if (! overwrite_existing)
     flag |= APR_FOPEN_EXCL;
   SVN_ERR(svn_io_file_open(&outfile, patch_abspath,



Mime
View raw message