subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1345381 - /subversion/trunk/subversion/libsvn_wc/copy.c
Date Fri, 01 Jun 2012 22:52:05 GMT
Author: rhuijben
Date: Fri Jun  1 22:52:04 2012
New Revision: 1345381

URL: http://svn.apache.org/viewvc?rev=1345381&view=rev
Log:
* subversion/libsvn_wc/copy.c
  (includes): Remove several unused include files.
  (copy_versioned_file): The target of a copy (when versioned) is a local
    addition, so should never be read only. It is way to expensive to check
    if it was really svn:needs-lock. (7.5% of the tree copy time was spend on
    these two transactions per file).

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

Modified: subversion/trunk/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/copy.c?rev=1345381&r1=1345380&r2=1345381&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/copy.c (original)
+++ subversion/trunk/subversion/libsvn_wc/copy.c Fri Jun  1 22:52:04 2012
@@ -35,10 +35,7 @@
 
 #include "wc.h"
 #include "workqueue.h"
-#include "adm_files.h"
 #include "props.h"
-#include "translate.h"
-#include "entries.h"
 
 #include "svn_private_config.h"
 #include "private/svn_wc_private.h"
@@ -221,17 +218,6 @@ copy_versioned_file(svn_wc__db_t *db,
         {
           svn_skel_t *work_item;
 
-          /* Remove 'read-only' from the destination file; it's a local add. */
-            {
-              const svn_string_t *needs_lock;
-              SVN_ERR(svn_wc__internal_propget(&needs_lock, db, src_abspath,
-                                               SVN_PROP_NEEDS_LOCK,
-                                               scratch_pool, scratch_pool));
-              if (needs_lock)
-                SVN_ERR(svn_io_set_file_read_write(tmp_dst_abspath,
-                                                   FALSE, scratch_pool));
-            }
-
           SVN_ERR(svn_wc__wq_build_file_move(&work_item, db, dir_abspath,
                                              tmp_dst_abspath, dst_abspath,
                                              scratch_pool, scratch_pool));
@@ -241,6 +227,11 @@ copy_versioned_file(svn_wc__db_t *db,
             {
               svn_boolean_t modified;
 
+              /* Remove 'read-only' from the destination file;
+                 it's a local add now. */
+              SVN_ERR(svn_io_set_file_read_write(tmp_dst_abspath,
+                                                 FALSE, scratch_pool));
+
               /* It's faster to look for mods on the source now, as
                  the timestamp might match, than to examine the
                  destination later as the destination timestamp will



Mime
View raw message