subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1757762 - /subversion/trunk/subversion/libsvn_client/conflicts.c
Date Thu, 25 Aug 2016 22:12:52 GMT
Author: ivan
Date: Thu Aug 25 22:12:51 2016
New Revision: 1757762

URL: http://svn.apache.org/viewvc?rev=1757762&view=rev
Log:
Get rid of unnecessary operation in tree conflict resolution.

* subversion/libsvn_client/conflicts.c
  (resolve_update_incoming_added_file_replace): Do not remove file before
   moving on top of it. The svn_io_file_rename2() overwrites destination file
   on all platforms.

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

Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1757762&r1=1757761&r2=1757762&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Thu Aug 25 22:12:51 2016
@@ -5432,14 +5432,6 @@ resolve_update_incoming_added_file_repla
   if (err)
     goto unlock_wc;
 
-  /* Remove the file. We're going to move the conflict victim on top and, at
-   * least on Windows, open files can't be replaced.
-   * The WC is locked so anything racing us here is external to SVN. */ 
-  err = svn_error_compose_create(err, svn_io_remove_file2(backup_path, TRUE,
-                                                          scratch_pool));
-  if (err)
-    goto unlock_wc;
-
   /* Create a backup by renaming the file on top of the 'reserved' name.
    * Renaming is equally fast for big and small files. */
   err = svn_io_file_rename2(local_abspath, backup_path, TRUE, scratch_pool);



Mime
View raw message