You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/01/29 16:17:36 UTC

svn commit: r1655701 - in /subversion/branches/pin-externals/subversion/libsvn_client: commit_util.c copy.c

Author: stsp
Date: Thu Jan 29 15:17:36 2015
New Revision: 1655701

URL: http://svn.apache.org/r1655701
Log:
On the pin-externals branch, set a commit item path during REPOS->WC copies.
This makes the changes made to commit_util.c on this branch unnecessary.

Suggested by: rhuijben

* subversion/libsvn_client/commit_util.c
  (do_item_commit): Revert changes from r1654018.

* subversion/libsvn_client/copy.c
  (queue_prop_change_commit_items): Add 'local_abspath' parameter. Use it to
   set item->path for new commit items.
  (wc_to_repos_copy): Pass on the copy source's absolute path.

Modified:
    subversion/branches/pin-externals/subversion/libsvn_client/commit_util.c
    subversion/branches/pin-externals/subversion/libsvn_client/copy.c

Modified: subversion/branches/pin-externals/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/commit_util.c?rev=1655701&r1=1655700&r2=1655701&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/commit_util.c Thu Jan 29 15:17:36 2015
@@ -1754,15 +1754,12 @@ do_item_commit(void **dir_baton,
          repository, a "not found" error does not occur immediately
          upon opening the directory.  It appears here during the delta
          transmisssion. */
-      if (local_abspath)
-        {
-          err = svn_wc_transmit_prop_deltas2(
-                  ctx->wc_ctx, local_abspath, editor,
-                  (kind == svn_node_dir) ? *dir_baton : file_baton, pool);
+      err = svn_wc_transmit_prop_deltas2(
+              ctx->wc_ctx, local_abspath, editor,
+              (kind == svn_node_dir) ? *dir_baton : file_baton, pool);
 
-          if (err)
-            goto fixup_error;
-        }
+      if (err)
+        goto fixup_error;
 
       /* Make any additional client -> repository prop changes. */
       if (item->outgoing_prop_changes)

Modified: subversion/branches/pin-externals/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/copy.c?rev=1655701&r1=1655700&r2=1655701&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/copy.c Thu Jan 29 15:17:36 2015
@@ -1627,13 +1627,15 @@ check_url_kind(void *baton,
   return SVN_NO_ERROR;
 }
 
-/* Queue a property change to COMMIT_URL in the COMMIT_ITEMS list.
- * If the list does not already have a commit item for LOCAL_ABSPATH
+/* Queue a property change on a copy of LOCAL_ABSPATH to COMMIT_URL
+ * in the COMMIT_ITEMS list.
+ * If the list does not already have a commit item for COMMIT_URL
  * add a new commit item for the property change.
  * Allocate results in RESULT_POOL.
  * Use SCRATCH_POOL for temporary allocations. */
 static svn_error_t *
-queue_prop_change_commit_items(const char *commit_url,
+queue_prop_change_commit_items(const char *local_abspath,
+                               const char *commit_url,
                                apr_array_header_t *commit_items,
                                const char *propname,
                                svn_string_t *propval,
@@ -1660,6 +1662,7 @@ queue_prop_change_commit_items(const cha
   if (item == NULL)
     {
       item = svn_client_commit_item3_create(result_pool);
+      item->path = local_abspath;
       item->url = commit_url;
       item->kind = svn_node_dir;
       item->state_flags = SVN_CLIENT_COMMIT_ITEM_PROP_MODS;
@@ -1951,6 +1954,7 @@ wc_to_repos_copy(const apr_array_header_
               svn_string_t *externals_propval = apr_hash_this_val(hi);
               const char *dst_url;
               const char *commit_url;
+              const char *src_abspath;
 
               if (svn_path_is_url(pair->dst_abspath_or_url))
                 dst_url = pair->dst_abspath_or_url;
@@ -1960,7 +1964,10 @@ wc_to_repos_copy(const apr_array_header_
                                              scratch_pool, iterpool));
               commit_url = svn_path_url_add_component2(dst_url, dst_relpath,
                                                        scratch_pool);
-              SVN_ERR(queue_prop_change_commit_items(commit_url, commit_items,
+              src_abspath = svn_dirent_join(pair->src_abspath_or_url,
+                                            dst_relpath, iterpool);
+              SVN_ERR(queue_prop_change_commit_items(src_abspath,
+                                                     commit_url, commit_items,
                                                      SVN_PROP_EXTERNALS,
                                                      externals_propval,
                                                      scratch_pool, iterpool));