subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1577066 - /subversion/trunk/subversion/libsvn_wc/merge.c
Date Thu, 13 Mar 2014 08:48:19 GMT
Author: rhuijben
Date: Thu Mar 13 08:48:19 2014
New Revision: 1577066

URL: http://svn.apache.org/r1577066
Log:
When merging a file, don't use the pristine install preparation code to
create a tempfile, but retrieve the right location properly.

* subversion/libsvn_wc/merge.c
  (includes): Stop including adm_files.h. Use other includes directly.
  (merge_file_trivial): Create temp file in tempdir, instead of abusing
    pristine magic.

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

Modified: subversion/trunk/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/merge.c?rev=1577066&r1=1577065&r2=1577066&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/merge.c (original)
+++ subversion/trunk/subversion/libsvn_wc/merge.c Thu Mar 13 08:48:19 2014
@@ -26,10 +26,11 @@
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
 #include "svn_pools.h"
+#include "svn_props.h"
 
 #include "wc.h"
-#include "adm_files.h"
 #include "conflicts.h"
+#include "props.h"
 #include "translate.h"
 #include "workqueue.h"
 
@@ -725,16 +726,20 @@ merge_file_trivial(svn_skel_t **work_ite
                 {
                   svn_stream_t *tmp_src;
                   svn_stream_t *tmp_dst;
+                  const char *tmp_dir;
 
                   SVN_ERR(svn_stream_open_readonly(&tmp_src, right_abspath,
                                                    scratch_pool,
                                                    scratch_pool));
 
-                  SVN_ERR(svn_wc__open_writable_base(&tmp_dst, &right_abspath,
-                                                     NULL, NULL,
-                                                     db, target_abspath,
-                                                     scratch_pool,
-                                                     scratch_pool));
+                  SVN_ERR(svn_wc__db_pristine_get_tempdir(&tmp_dir, db,
+                                                          target_abspath,
+                                                          scratch_pool,
+                                                          scratch_pool));
+
+                  SVN_ERR(svn_stream_open_unique(&tmp_dst, &right_abspath,
+                                                 tmp_dir, svn_io_file_del_none,
+                                                 scratch_pool, scratch_pool));
 
                   SVN_ERR(svn_stream_copy3(tmp_src, tmp_dst,
                                            cancel_func, cancel_baton,



Mime
View raw message