You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2019/09/18 04:00:07 UTC

svn commit: r1867093 - in /subversion/branches/1.12.x: ./ STATUS subversion/libsvn_client/patch.c

Author: svn-role
Date: Wed Sep 18 04:00:06 2019
New Revision: 1867093

URL: http://svn.apache.org/viewvc?rev=1867093&view=rev
Log:
Merge r1864440 from trunk:

  * r1864440
   Fix 'svn patch' setting UNIX permissions to 0600 on files with props.
   Justification:
     'svn patch' should honour the user's umask.
     User complained: https://svn.haxx.se/dev/archive-2019-07/0072.shtml
   Votes:
     +1: stsp, brane

Modified:
    subversion/branches/1.12.x/   (props changed)
    subversion/branches/1.12.x/STATUS
    subversion/branches/1.12.x/subversion/libsvn_client/patch.c

Propchange: subversion/branches/1.12.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep 18 04:00:06 2019
@@ -102,4 +102,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1855419,1856397,1857367,1857391,1859732,1859734,1860175,1860186-1860188,1860936,1860951,1860958,1863262,1863987,1863990,1864025,1865266
+/subversion/trunk:1855419,1856397,1857367,1857391,1859732,1859734,1860175,1860186-1860188,1860936,1860951,1860958,1863262,1863987,1863990,1864025,1864440,1865266

Modified: subversion/branches/1.12.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.12.x/STATUS?rev=1867093&r1=1867092&r2=1867093&view=diff
==============================================================================
--- subversion/branches/1.12.x/STATUS (original)
+++ subversion/branches/1.12.x/STATUS Wed Sep 18 04:00:06 2019
@@ -28,14 +28,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
-  * r1864440
-   Fix 'svn patch' setting UNIX permissions to 0600 on files with props.
-   Justification:
-     'svn patch' should honour the user's umask.
-     User complained: https://svn.haxx.se/dev/archive-2019-07/0072.shtml
-   Votes:
-     +1: stsp, brane
-
  * r1866425
    mod_dav_svn: Set Last-Modified response header for 'external' GET requests.
    Justification:
@@ -45,4 +37,3 @@ Approved changes:
      these, while keeping the performance gain for checkout / update.
    Votes:
      +1: jcorvel, brane
-

Modified: subversion/branches/1.12.x/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.12.x/subversion/libsvn_client/patch.c?rev=1867093&r1=1867092&r2=1867093&view=diff
==============================================================================
--- subversion/branches/1.12.x/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/1.12.x/subversion/libsvn_client/patch.c Wed Sep 18 04:00:06 2019
@@ -1020,6 +1020,7 @@ init_patch_target(patch_target_t **patch
   target_content_t *content;
   svn_boolean_t has_text_changes = FALSE;
   svn_boolean_t follow_moves;
+  const char *tempdir_abspath;
 
   has_text_changes = ((patch->hunks && patch->hunks->nelts > 0)
                       || patch->binary_patch);
@@ -1225,8 +1226,10 @@ init_patch_target(patch_target_t **patch
         }
 
       /* Open a temporary file to write the patched result to. */
+      SVN_ERR(svn_wc__get_tmpdir(&tempdir_abspath, wc_ctx,
+          target->local_abspath, scratch_pool, scratch_pool));
       SVN_ERR(svn_io_open_unique_file3(&target->patched_file,
-                                       &target->patched_path, NULL,
+                                       &target->patched_path, tempdir_abspath,
                                        remove_tempfiles ?
                                          svn_io_file_del_on_pool_cleanup :
                                          svn_io_file_del_none,
@@ -1238,7 +1241,7 @@ init_patch_target(patch_target_t **patch
 
       /* Open a temporary stream to write rejected hunks to. */
       SVN_ERR(svn_stream_open_unique(&target->reject_stream,
-                                     &target->reject_path, NULL,
+                                     &target->reject_path, tempdir_abspath,
                                      remove_tempfiles ?
                                          svn_io_file_del_on_pool_cleanup :
                                          svn_io_file_del_none,