You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2011/01/20 15:57:07 UTC

svn commit: r1061328 - /subversion/trunk/subversion/libsvn_client/copy.c

Author: philip
Date: Thu Jan 20 14:57:06 2011
New Revision: 1061328

URL: http://svn.apache.org/viewvc?rev=1061328&view=rev
Log:
Make wc-to-wc moves faster by avoiding some copying; this also
preserves timestamps within a moved working tree.

* subversion/libsvn_client/copy.c
  (do_wc_to_wc_moves_with_locks2): Only copy metadata and not the
   working tree, rename the working tree to move it.

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

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1061328&r1=1061327&r2=1061328&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Thu Jan 20 14:57:06 2011
@@ -340,11 +340,18 @@ do_wc_to_wc_moves_with_locks2(void *bato
                                 scratch_pool);
 
   SVN_ERR(svn_wc_copy3(b->ctx->wc_ctx, b->pair->src_abspath_or_url,
-                       dst_abspath, FALSE /* metadata_only */,
+                       dst_abspath, TRUE /* metadata_only */,
                        b->ctx->cancel_func, b->ctx->cancel_baton,
                        b->ctx->notify_func2, b->ctx->notify_baton2,
                        scratch_pool));
 
+  /* Should we be using a workqueue for this move?  It's not clear.
+     What should happen if the copy above is interrupted?  The user
+     may want to abort the move and a workqueue might interfere with
+     that. */
+  SVN_ERR(svn_io_file_rename(b->pair->src_abspath_or_url, dst_abspath,
+                             scratch_pool));
+
   SVN_ERR(svn_wc_delete4(b->ctx->wc_ctx, b->pair->src_abspath_or_url,
                          FALSE, FALSE,
                          b->ctx->cancel_func, b->ctx->cancel_baton,