subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r997472 [8/41] - in /subversion/branches/py-tests-as-modules: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/server-side/ notes/ notes/tree-conflicts/ notes/wc-ng/ subversion/bindings/javahl/native/ subversio...
Date Wed, 15 Sep 2010 19:32:38 GMT
Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/commit.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/commit.c Wed Sep 15 19:32:26 2010
@@ -309,7 +309,7 @@ import_dir(const svn_delta_editor_t *edi
   if (!no_ignore)
     SVN_ERR(svn_wc_get_default_ignores(&ignores, ctx->config, pool));
 
-  SVN_ERR(svn_io_get_dirents2(&dirents, path, pool));
+  SVN_ERR(svn_io_get_dirents3(&dirents, path, TRUE, pool, pool));
 
   for (hi = apr_hash_first(pool, dirents); hi; hi = apr_hash_next(hi))
     {
@@ -444,7 +444,7 @@ import_dir(const svn_delta_editor_t *edi
  * EDIT_BATON.  PATH can be a file or directory.
  *
  * DEPTH is the depth at which to import PATH; it behaves as for
- * svn_client_import3().
+ * svn_client_import4().
  *
  * NEW_ENTRIES is an ordered array of path components that must be
  * created in the repository (where the ordering direction is
@@ -592,30 +592,52 @@ import(const char *path,
 }
 
 
+struct capture_baton_t {
+  svn_commit_callback2_t original_callback;
+  void *original_baton;
+
+  svn_commit_info_t **info;
+  apr_pool_t *pool;
+};
+
+
+static svn_error_t *
+capture_commit_info(const svn_commit_info_t *commit_info,
+                    void *baton,
+                    apr_pool_t *pool)
+{
+  struct capture_baton_t *cb = baton;
+
+  *(cb->info) = svn_commit_info_dup(commit_info, cb->pool);
+
+  if (cb->original_callback)
+    SVN_ERR((cb->original_callback)(commit_info, cb->original_baton, pool));
+
+  return SVN_NO_ERROR;
+}
+
+
 static svn_error_t *
 get_ra_editor(svn_ra_session_t **ra_session,
               const svn_delta_editor_t **editor,
               void **edit_baton,
               svn_client_ctx_t *ctx,
               const char *base_url,
-              const char *base_dir,
+              const char *base_dir_abspath,
               const char *log_msg,
               const apr_array_header_t *commit_items,
               const apr_hash_t *revprop_table,
-              svn_commit_info_t **commit_info_p,
               svn_boolean_t is_commit,
               apr_hash_t *lock_tokens,
               svn_boolean_t keep_locks,
+              svn_commit_callback2_t commit_callback,
+              void *commit_baton,
               apr_pool_t *pool)
 {
-  void *commit_baton;
   apr_hash_t *commit_revprops;
-  const char *base_dir_abspath;
-
-  SVN_ERR(svn_dirent_get_absolute(&base_dir_abspath, base_dir, pool));
 
   /* Open an RA session to URL. */
-  SVN_ERR(svn_client__open_ra_session_internal(ra_session, base_url,
+  SVN_ERR(svn_client__open_ra_session_internal(ra_session, NULL, base_url,
                                                base_dir_abspath, commit_items,
                                                is_commit, !is_commit,
                                                ctx, pool));
@@ -638,10 +660,8 @@ get_ra_editor(svn_ra_session_t **ra_sess
                                            log_msg, ctx, pool));
 
   /* Fetch RA commit editor. */
-  SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
   return svn_ra_get_commit_editor3(*ra_session, editor, edit_baton,
-                                   commit_revprops,
-                                   svn_client__commit_callback,
+                                   commit_revprops, commit_callback,
                                    commit_baton, lock_tokens, keep_locks,
                                    pool);
 }
@@ -650,13 +670,14 @@ get_ra_editor(svn_ra_session_t **ra_sess
 /*** Public Interfaces. ***/
 
 svn_error_t *
-svn_client_import3(svn_commit_info_t **commit_info_p,
-                   const char *path,
+svn_client_import4(const char *path,
                    const char *url,
                    svn_depth_t depth,
                    svn_boolean_t no_ignore,
                    svn_boolean_t ignore_unknown_node_types,
                    const apr_hash_t *revprop_table,
+                   svn_commit_callback2_t commit_callback,
+                   void *commit_baton,
                    svn_client_ctx_t *ctx,
                    apr_pool_t *pool)
 {
@@ -667,13 +688,22 @@ svn_client_import3(svn_commit_info_t **c
   svn_ra_session_t *ra_session;
   apr_hash_t *excludes = apr_hash_make(pool);
   svn_node_kind_t kind;
-  const char *base_dir = path;
+  const char *local_abspath;
+  const char *base_dir_abspath;
   apr_array_header_t *new_entries = apr_array_make(pool, 4,
                                                    sizeof(const char *));
   const char *temp;
   const char *dir;
   apr_pool_t *subpool;
 
+  if (svn_path_is_url(path))
+    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                              _("'%s' is not a local path"),
+                                              path));
+
+  SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
+  base_dir_abspath = local_abspath;
+
   /* Create a new commit item and add it to the array. */
   if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
     {
@@ -702,9 +732,9 @@ svn_client_import3(svn_commit_info_t **c
         }
     }
 
-  SVN_ERR(svn_io_check_path(path, &kind, pool));
+  SVN_ERR(svn_io_check_path(local_abspath, &kind, pool));
   if (kind == svn_node_file)
-    base_dir = svn_dirent_dirname(path, pool);
+    base_dir_abspath = svn_dirent_dirname(local_abspath, pool);
 
   /* Figure out all the path components we need to create just to have
      a place to stick our imported tree. */
@@ -728,16 +758,16 @@ svn_client_import3(svn_commit_info_t **c
           else
             svn_error_clear(err);
 
-          svn_uri_split(url, &temp, &dir, pool);
+          svn_uri_split(&temp, &dir, url, pool);
           APR_ARRAY_PUSH(new_entries, const char *) =
             svn_path_uri_decode(dir, pool);
           url = temp;
         }
     }
   while ((err = get_ra_editor(&ra_session,
-                              &editor, &edit_baton, ctx, url, base_dir,
-                              log_msg, NULL, revprop_table,
-                              commit_info_p, FALSE, NULL, TRUE, subpool)));
+                              &editor, &edit_baton, ctx, url, base_dir_abspath,
+                              log_msg, NULL, revprop_table, FALSE, NULL, TRUE,
+                              commit_callback, commit_baton, subpool)));
 
   /* Reverse the order of the components we added to our NEW_ENTRIES array. */
   if (new_entries->nelts)
@@ -792,59 +822,22 @@ svn_client_import3(svn_commit_info_t **c
       return err;
     }
 
-  /* Transfer *COMMIT_INFO from the subpool to the callers pool */
-  if (*commit_info_p)
-    *commit_info_p = svn_commit_info_dup(*commit_info_p, pool);
-
   svn_pool_destroy(subpool);
 
   return SVN_NO_ERROR;
 }
 
 
-/* Remove (if it exists) each file whose path is given by a value in the
- * hash TEMPFILES, which is a mapping from (const char *) path to (const
- * char *) tempfile abspath.  Ignore the keys of TEMPFILES. */
-static svn_error_t *
-remove_tmpfiles(apr_hash_t *tempfiles,
-                apr_pool_t *pool)
-{
-  apr_hash_index_t *hi;
-  apr_pool_t *iterpool;
-
-  /* Split if there's nothing to be done. */
-  if (! tempfiles)
-    return SVN_NO_ERROR;
-
-  iterpool = svn_pool_create(pool);
-
-  /* Clean up any tempfiles. */
-  for (hi = apr_hash_first(pool, tempfiles); hi; hi = apr_hash_next(hi))
-    {
-      const char *path = svn__apr_hash_index_val(hi);
-
-      svn_pool_clear(iterpool);
-
-      SVN_ERR(svn_io_remove_file2(path, TRUE, iterpool));
-    }
-  svn_pool_destroy(iterpool);
-
-  return SVN_NO_ERROR;
-}
-
-
-
 static svn_error_t *
 reconcile_errors(svn_error_t *commit_err,
                  svn_error_t *unlock_err,
                  svn_error_t *bump_err,
-                 svn_error_t *cleanup_err,
                  apr_pool_t *pool)
 {
   svn_error_t *err;
 
   /* Early release (for good behavior). */
-  if (! (commit_err || unlock_err || bump_err || cleanup_err))
+  if (! (commit_err || unlock_err || bump_err))
     return SVN_NO_ERROR;
 
   /* If there was a commit error, start off our error chain with
@@ -884,17 +877,6 @@ reconcile_errors(svn_error_t *commit_err
       svn_error_compose(err, bump_err);
     }
 
-  /* If there was a cleanup error... */
-  if (cleanup_err)
-    {
-      /* Wrap the error with some headers. */
-      cleanup_err = svn_error_quick_wrap
-        (cleanup_err, _("Error in post-commit clean-up (details follow):"));
-
-      /* Append this error to the chain. */
-      svn_error_compose(err, cleanup_err);
-    }
-
   return err;
 }
 
@@ -947,23 +929,6 @@ post_process_commit_item(svn_wc_committe
   svn_boolean_t loop_recurse = FALSE;
   svn_boolean_t remove_lock;
 
-  /* Is it a missing, deleted directory?
-
-     ### Temporary: once we centralise this sort of node is just a
-     normal delete and will get handled by the post-commit queue. */
-  if (item->kind == svn_node_dir
-      && item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE)
-    {
-      svn_boolean_t obstructed;
-
-      SVN_ERR(svn_wc__node_is_status_obstructed(&obstructed,
-                                                wc_ctx, item->path,
-                                                scratch_pool));
-      if (obstructed)
-        return svn_wc__temp_mark_missing_not_present(item->path,
-                                                     wc_ctx, scratch_pool);
-    }
-
   if ((item->state_flags & SVN_CLIENT_COMMIT_ITEM_ADD)
       && (item->kind == svn_node_dir)
       && (item->copyfrom_url))
@@ -1049,18 +1014,20 @@ check_nonrecursive_dir_delete(const char
 }
 
 svn_error_t *
-svn_client_commit4(svn_commit_info_t **commit_info_p,
-                   const apr_array_header_t *targets,
+svn_client_commit5(const apr_array_header_t *targets,
                    svn_depth_t depth,
                    svn_boolean_t keep_locks,
                    svn_boolean_t keep_changelists,
                    const apr_array_header_t *changelists,
                    const apr_hash_t *revprop_table,
+                   svn_commit_callback2_t commit_callback,
+                   void *commit_baton,
                    svn_client_ctx_t *ctx,
                    apr_pool_t *pool)
 {
   const svn_delta_editor_t *editor;
   void *edit_baton;
+  struct capture_baton_t cb;
   svn_ra_session_t *ra_session;
   const char *log_msg;
   const char *base_abspath;
@@ -1069,13 +1036,13 @@ svn_client_commit4(svn_commit_info_t **c
   apr_array_header_t *rel_targets;
   apr_hash_t *committables;
   apr_hash_t *lock_tokens;
-  apr_hash_t *tempfiles = NULL;
   apr_hash_t *md5_checksums;
   apr_hash_t *sha1_checksums;
   apr_array_header_t *commit_items;
   svn_error_t *cmt_err = SVN_NO_ERROR, *unlock_err = SVN_NO_ERROR;
-  svn_error_t *bump_err = SVN_NO_ERROR, *cleanup_err = SVN_NO_ERROR;
+  svn_error_t *bump_err = SVN_NO_ERROR;
   svn_boolean_t commit_in_progress = FALSE;
+  svn_commit_info_t *commit_info = NULL;
   const char *current_abspath;
   const char *notify_prefix;
   int i;
@@ -1097,13 +1064,7 @@ svn_client_commit4(svn_commit_info_t **c
 
   /* No targets means nothing to commit, so just return. */
   if (base_abspath == NULL)
-    {
-      /* As per our promise, if *commit_info_p isn't set, provide a
-         default where rev = SVN_INVALID_REVNUM. */
-      if (! *commit_info_p)
-        *commit_info_p = svn_create_commit_info(pool);
-      return SVN_NO_ERROR;
-    }
+    return SVN_NO_ERROR;
 
   SVN_ERR_ASSERT(rel_targets != NULL);
 
@@ -1129,7 +1090,7 @@ svn_client_commit4(svn_commit_info_t **c
                                                   pool);
 
   SVN_ERR(svn_wc__acquire_write_lock(NULL, ctx->wc_ctx, base_abspath,
-                                     pool, pool));
+                                     FALSE, pool, pool));
 
   /* One day we might support committing from multiple working copies, but
      we don't yet.  This check ensures that we don't silently commit a
@@ -1160,6 +1121,7 @@ svn_client_commit4(svn_commit_info_t **c
                                                   ! keep_locks,
                                                   changelists,
                                                   ctx,
+                                                  pool,
                                                   pool)))
     goto cleanup;
 
@@ -1221,11 +1183,16 @@ svn_client_commit4(svn_commit_info_t **c
                                      pool)))
     goto cleanup;
 
-  if ((cmt_err = get_ra_editor(&ra_session,
-                               &editor, &edit_baton, ctx,
+  cb.original_callback = commit_callback;
+  cb.original_baton = commit_baton;
+  cb.info = &commit_info;
+  cb.pool = pool;
+
+  if ((cmt_err = get_ra_editor(&ra_session, &editor, &edit_baton, ctx,
                                base_url, base_abspath, log_msg,
-                               commit_items, revprop_table, commit_info_p,
-                               TRUE, lock_tokens, keep_locks, pool)))
+                               commit_items, revprop_table, TRUE, lock_tokens,
+                               keep_locks, capture_commit_info,
+                               &cb, pool)))
     goto cleanup;
 
   /* Make a note that we have a commit-in-progress. */
@@ -1233,7 +1200,7 @@ svn_client_commit4(svn_commit_info_t **c
 
   /* Perform the commit. */
   cmt_err = svn_client__do_commit(base_url, commit_items, editor, edit_baton,
-                                  notify_prefix, &tempfiles, &md5_checksums,
+                                  notify_prefix, &md5_checksums,
                                   &sha1_checksums, ctx, pool);
 
   /* Handle a successful commit. */
@@ -1266,12 +1233,12 @@ svn_client_commit4(svn_commit_info_t **c
         }
       svn_pool_destroy(iterpool);
 
-      SVN_ERR_ASSERT(*commit_info_p);
+      SVN_ERR_ASSERT(commit_info);
       bump_err
         = svn_wc_process_committed_queue2(queue, ctx->wc_ctx,
-                                         (*commit_info_p)->revision,
-                                         (*commit_info_p)->date,
-                                         (*commit_info_p)->author,
+                                         commit_info->revision,
+                                         commit_info->date,
+                                         commit_info->author,
                                          pool);
     }
 
@@ -1289,17 +1256,7 @@ svn_client_commit4(svn_commit_info_t **c
      attempt to modify the working copy, so it doesn't prevent explicit
      clean-up. */
   if (! bump_err)
-    {
-      unlock_err = svn_wc__release_write_lock(ctx->wc_ctx, base_abspath, pool);
-
-      if (! unlock_err)
-        cleanup_err = remove_tmpfiles(tempfiles, pool);
-    }
-
-  /* As per our promise, if *commit_info_p isn't set, provide a default where
-     rev = SVN_INVALID_REVNUM. */
-  if (! *commit_info_p)
-    *commit_info_p = svn_create_commit_info(pool);
+    unlock_err = svn_wc__release_write_lock(ctx->wc_ctx, base_abspath, pool);
 
-  return reconcile_errors(cmt_err, unlock_err, bump_err, cleanup_err, pool);
+  return reconcile_errors(cmt_err, unlock_err, bump_err, pool);
 }

Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/commit_util.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/commit_util.c Wed Sep 15 19:32:26 2010
@@ -73,24 +73,27 @@ fixup_out_of_date_error(const char *path
 
 /* Add a new commit candidate (described by all parameters except
    `COMMITTABLES') to the COMMITTABLES hash.  All of the commit item's
-   members are allocated out of the COMMITTABLES hash pool. */
+   members are allocated out of RESULT_POOL. */
 static svn_error_t *
 add_committable(apr_hash_t *committables,
-                const char *path,
+                const char *local_abspath,
                 svn_node_kind_t kind,
-                const char *url,
+                const char *repos_root_url,
+                const char *repos_relpath,
                 svn_revnum_t revision,
-                const char *copyfrom_url,
+                const char *copyfrom_relpath,
                 svn_revnum_t copyfrom_rev,
-                apr_byte_t state_flags)
+                apr_byte_t state_flags,
+                apr_pool_t *result_pool,
+                apr_pool_t *scratch_pool)
 {
-  apr_pool_t *pool = apr_hash_pool_get(committables);
   const char *repos_name = SVN_CLIENT__SINGLE_REPOS_NAME;
   apr_array_header_t *array;
   svn_client_commit_item3_t *new_item;
 
   /* Sanity checks. */
-  SVN_ERR_ASSERT(path && url);
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+  SVN_ERR_ASSERT(repos_root_url && repos_relpath);
 
   /* ### todo: Get the canonical repository for this item, which will
      be the real key for the COMMITTABLES hash, instead of the above
@@ -101,22 +104,27 @@ add_committable(apr_hash_t *committables
      problem, we'll just create (and add to the hash) one. */
   if (array == NULL)
     {
-      array = apr_array_make(pool, 1, sizeof(new_item));
+      array = apr_array_make(result_pool, 1, sizeof(new_item));
       apr_hash_set(committables, repos_name, APR_HASH_KEY_STRING, array);
     }
 
   /* Now update pointer values, ensuring that their allocations live
      in POOL. */
-  new_item = svn_client_commit_item3_create(pool);
-  new_item->path           = apr_pstrdup(pool, path);
+  new_item = svn_client_commit_item3_create(result_pool);
+  new_item->path           = apr_pstrdup(result_pool, local_abspath);
   new_item->kind           = kind;
-  new_item->url            = apr_pstrdup(pool, url);
+  new_item->url            = svn_path_url_add_component2(repos_root_url,
+                                                         repos_relpath,
+                                                         result_pool);
   new_item->revision       = revision;
-  new_item->copyfrom_url   = copyfrom_url
-    ? apr_pstrdup(pool, copyfrom_url) : NULL;
+  new_item->copyfrom_url   = copyfrom_relpath
+                                ? svn_path_url_add_component2(repos_root_url,
+                                                              copyfrom_relpath,
+                                                              result_pool)
+                                : NULL;
   new_item->copyfrom_rev   = copyfrom_rev;
   new_item->state_flags    = state_flags;
-  new_item->incoming_prop_changes = apr_array_make(pool, 1,
+  new_item->incoming_prop_changes = apr_array_make(result_pool, 1,
                                                    sizeof(svn_prop_t *));
 
   /* Now, add the commit item to the array. */
@@ -363,7 +371,8 @@ static svn_error_t *
 harvest_committables(apr_hash_t *committables,
                      apr_hash_t *lock_tokens,
                      const char *local_abspath,
-                     const char *url,
+                     const char *repos_root_url,
+                     const char *repos_relpath,
                      svn_boolean_t adds_only,
                      svn_boolean_t copy_mode,
                      svn_boolean_t copy_mode_root,
@@ -371,6 +380,7 @@ harvest_committables(apr_hash_t *committ
                      svn_boolean_t just_locked,
                      apr_hash_t *changelists,
                      svn_client_ctx_t *ctx,
+                     apr_pool_t *result_pool,
                      apr_pool_t *scratch_pool)
 {
   svn_boolean_t text_mod = FALSE;
@@ -378,17 +388,17 @@ harvest_committables(apr_hash_t *committ
   apr_byte_t state_flags = 0;
   svn_node_kind_t working_kind;
   svn_node_kind_t db_kind;
-  const char *entry_url;
+  const char *entry_relpath;
   const char *entry_lock_token;
-  const char *cf_url = NULL;
+  const char *cf_relpath = NULL;
   svn_revnum_t entry_rev, cf_rev = SVN_INVALID_REVNUM;
   const svn_string_t *propval;
   svn_boolean_t is_special;
   svn_boolean_t is_file_external;
   svn_boolean_t is_added;
-  const char *node_copyfrom_url;
+  const char *node_copyfrom_relpath;
   svn_revnum_t node_copyfrom_rev;
-  svn_boolean_t keep_local;
+  svn_wc_context_t *wc_ctx = ctx->wc_ctx;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
@@ -396,7 +406,8 @@ harvest_committables(apr_hash_t *committ
   if (look_up_committable(committables, local_abspath, scratch_pool))
     return SVN_NO_ERROR;
 
-  SVN_ERR_ASSERT((copy_mode && url) || (! copy_mode && ! url));
+  SVN_ERR_ASSERT((copy_mode && repos_relpath)
+                 || (! copy_mode && ! repos_relpath));
   SVN_ERR_ASSERT((copy_mode_root && copy_mode) || ! copy_mode_root);
   SVN_ERR_ASSERT((just_locked && lock_tokens) || !just_locked);
 
@@ -470,19 +481,16 @@ harvest_committables(apr_hash_t *committ
         }
     }
 
-  SVN_ERR(svn_wc__temp_get_keep_local(&keep_local, ctx->wc_ctx,
-                                      local_abspath, scratch_pool));
-  if (! keep_local)
-    SVN_ERR(bail_on_tree_conflicted_children(ctx->wc_ctx, local_abspath,
-                                             db_kind, depth, changelists,
-                                             scratch_pool));
+  SVN_ERR(bail_on_tree_conflicted_children(ctx->wc_ctx, local_abspath,
+                                           db_kind, depth, changelists,
+                                           scratch_pool));
 
   /* Our own URL wins if not in COPY_MODE.  In COPY_MODE the
      telescoping URLs are used. */
-  SVN_ERR(svn_wc__node_get_url(&entry_url, ctx->wc_ctx, local_abspath,
-                               scratch_pool, scratch_pool));
+  SVN_ERR(svn_wc__node_get_repos_relpath(&entry_relpath, wc_ctx, local_abspath,
+                                         scratch_pool, scratch_pool));
   if (! copy_mode)
-    url = entry_url;
+    repos_relpath = entry_relpath;
 
 
   /* Check for the deletion case.  Deletes occur only when not in
@@ -522,7 +530,7 @@ harvest_committables(apr_hash_t *committ
           svn_boolean_t is_copy_target;
           /* ### TODO: sensibly align this call of get_copyfrom_info() with
            * the same call below (when checking added nodes). */
-          SVN_ERR(svn_wc__node_get_copyfrom_info(&is_copy, NULL,
+          SVN_ERR(svn_wc__node_get_copyfrom_info(NULL, NULL, &is_copy, NULL,
                                                  &is_copy_target, ctx->wc_ctx,
                                                  local_abspath, scratch_pool,
                                                  scratch_pool));
@@ -543,20 +551,20 @@ harvest_committables(apr_hash_t *committ
     {
       svn_boolean_t is_copy_target;
 
-      SVN_ERR(svn_wc__node_get_copyfrom_info(&node_copyfrom_url,
-                                             &node_copyfrom_rev,
+      SVN_ERR(svn_wc__node_get_copyfrom_info(NULL, &node_copyfrom_relpath,
+                                             NULL, &node_copyfrom_rev,
                                              &is_copy_target,
-                                             ctx->wc_ctx, local_abspath,
+                                             wc_ctx, local_abspath,
                                              scratch_pool, scratch_pool));
       if (is_copy_target)
         {
           state_flags |= SVN_CLIENT_COMMIT_ITEM_ADD;
           state_flags |= SVN_CLIENT_COMMIT_ITEM_IS_COPY;
-          cf_url = node_copyfrom_url;
+          cf_relpath = node_copyfrom_relpath;
           cf_rev = node_copyfrom_rev;
           adds_only = FALSE;
         }
-      else if (!node_copyfrom_url)
+      else if (!node_copyfrom_relpath)
         {
           state_flags |= SVN_CLIENT_COMMIT_ITEM_ADD;
           adds_only = TRUE;
@@ -567,21 +575,23 @@ harvest_committables(apr_hash_t *committ
              behaviour for is_copy_target.  In this case we really
              want all the copy targets, even those where just the
              copfrom revision is different. */
-          const char *parent_copyfrom_url;
+          const char *parent_copyfrom_relpath;
           svn_revnum_t parent_copyfrom_rev;
           const char *parent_abspath = svn_dirent_dirname(local_abspath,
                                                           scratch_pool);
 
-          SVN_ERR(svn_wc__node_get_copyfrom_info(&parent_copyfrom_url,
+          SVN_ERR(svn_wc__node_get_copyfrom_info(NULL,
+                                                 &parent_copyfrom_relpath,
+                                                 NULL,
                                                  &parent_copyfrom_rev,
                                                  NULL,
-                                                 ctx->wc_ctx, parent_abspath,
+                                                 wc_ctx, parent_abspath,
                                                  scratch_pool, scratch_pool));
           if (parent_copyfrom_rev != node_copyfrom_rev)
             {
               state_flags |= SVN_CLIENT_COMMIT_ITEM_ADD;
               state_flags |= SVN_CLIENT_COMMIT_ITEM_IS_COPY;
-              cf_url = node_copyfrom_url;
+              cf_relpath = node_copyfrom_relpath;
               cf_rev = node_copyfrom_rev;
               adds_only = FALSE;
             }
@@ -589,7 +599,7 @@ harvest_committables(apr_hash_t *committ
     }
   else
     {
-      node_copyfrom_url = NULL;
+      node_copyfrom_relpath = NULL;
       node_copyfrom_rev = SVN_INVALID_REVNUM;
     }
 
@@ -610,17 +620,17 @@ harvest_committables(apr_hash_t *committ
       if (copy_mode_root || entry_rev != p_rev)
         {
           state_flags |= SVN_CLIENT_COMMIT_ITEM_ADD;
-          if (node_copyfrom_url)
+          if (node_copyfrom_relpath)
             {
               state_flags |= SVN_CLIENT_COMMIT_ITEM_IS_COPY;
-              cf_url = node_copyfrom_url;
+              cf_relpath = node_copyfrom_relpath;
               cf_rev = node_copyfrom_rev;
               adds_only = FALSE;
             }
           else if (entry_rev != SVN_INVALID_REVNUM)
             {
               state_flags |= SVN_CLIENT_COMMIT_ITEM_IS_COPY;
-              cf_url = entry_url;
+              cf_relpath = entry_relpath;
               cf_rev = entry_rev;
               adds_only = FALSE;
             }
@@ -716,15 +726,23 @@ harvest_committables(apr_hash_t *committ
                                    scratch_pool))
         {
           /* Finally, add the committable item. */
-          SVN_ERR(add_committable(committables, local_abspath, db_kind, url,
+          SVN_ERR(add_committable(committables, local_abspath, db_kind,
+                                  repos_root_url, repos_relpath,
                                   entry_rev,
-                                  cf_url,
+                                  cf_relpath,
                                   cf_rev,
-                                  state_flags));
+                                  state_flags,
+                                  result_pool, scratch_pool));
           if (state_flags & SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN)
-            apr_hash_set(lock_tokens,
+            {
+              const char *url = svn_path_url_add_component2(
+                                  repos_root_url,
+                                  repos_relpath, scratch_pool);
+
+              apr_hash_set(lock_tokens,
                          apr_pstrdup(apr_hash_pool_get(lock_tokens), url),
                          APR_HASH_KEY_STRING, entry_lock_token);
+            }
         }
     }
 
@@ -748,7 +766,7 @@ harvest_committables(apr_hash_t *committ
         {
           const char *this_abspath = APR_ARRAY_IDX(children, i, const char *);
           const char *name = svn_dirent_basename(this_abspath, NULL);
-          const char *this_url;
+          const char *this_repos_relpath;
           svn_depth_t this_depth;
           svn_boolean_t is_replaced, this_is_deleted;
           svn_node_kind_t this_kind;
@@ -823,10 +841,12 @@ harvest_committables(apr_hash_t *committ
             continue;
 
           if (! copy_mode)
-            SVN_ERR(svn_wc__node_get_url(&this_url, ctx->wc_ctx,
-                                         this_abspath, iterpool, iterpool));
+            SVN_ERR(svn_wc__node_get_repos_relpath(&this_repos_relpath, wc_ctx,
+                                                   this_abspath, iterpool,
+                                                   iterpool));
           else
-            this_url = svn_path_url_add_component2(url, name, iterpool);
+            this_repos_relpath = svn_relpath_join(repos_relpath, name,
+                                                  iterpool);
 
           /* Recurse. */
           SVN_ERR(svn_wc_read_kind(&this_kind, ctx->wc_ctx, this_abspath,
@@ -839,42 +859,6 @@ harvest_committables(apr_hash_t *committ
                      and depth says not to go there. */
                   continue;
                 }
-              else
-                {
-                  svn_boolean_t obstructed;
-
-                  SVN_ERR(svn_wc__node_is_status_obstructed(&obstructed,
-                                                            ctx->wc_ctx,
-                                                            this_abspath,
-                                                            iterpool));
-
-                  if (obstructed)
-                    {
-                      /* A missing, schedule-delete child dir is
-                         allowable.  Just don't try to recurse. */
-                      svn_node_kind_t childkind;
-                      SVN_ERR(svn_io_check_path(this_abspath,
-                                                &childkind,
-                                                iterpool));
-                      if (childkind == svn_node_none && this_is_deleted)
-                        {
-                          if (svn_wc__changelist_match(ctx->wc_ctx,
-                                                       this_abspath,
-                                                       changelists,
-                                                       iterpool))
-                            {
-                              SVN_ERR(add_committable(
-                                committables, this_abspath,
-                                this_kind, this_url,
-                                SVN_INVALID_REVNUM,
-                                NULL,
-                                SVN_INVALID_REVNUM,
-                                SVN_CLIENT_COMMIT_ITEM_DELETE));
-                              continue; /* don't recurse! */
-                            }
-                        }
-                    }
-                }
             }
 
           {
@@ -892,17 +876,19 @@ harvest_committables(apr_hash_t *committ
                 || depth == svn_depth_files)
               depth_below_here = svn_depth_empty;
 
-            SVN_ERR(harvest_committables
-                    (committables, lock_tokens, this_abspath,
-                     copy_mode ? this_url : NULL,
-                     adds_only,
-                     copy_mode,
-                     FALSE, /* COPY_MODE_ROOT */
-                     depth_below_here,
-                     just_locked,
-                     changelists,
-                     ctx,
-                     iterpool));
+            SVN_ERR(harvest_committables(committables, lock_tokens,
+                                         this_abspath,
+                                         repos_root_url,
+                                         copy_mode ? this_repos_relpath : NULL,
+                                         adds_only,
+                                         copy_mode,
+                                         FALSE, /* COPY_MODE_ROOT */
+                                         depth_below_here,
+                                         just_locked,
+                                         changelists,
+                                         ctx,
+                                         result_pool,
+                                         iterpool));
           }
         }
 
@@ -962,17 +948,20 @@ validate_dangler(void *baton,
 svn_error_t *
 svn_client__harvest_committables(apr_hash_t **committables,
                                  apr_hash_t **lock_tokens,
-                                 const char *base_abspath,
+                                 const char *base_dir_abspath,
                                  const apr_array_header_t *targets,
                                  svn_depth_t depth,
                                  svn_boolean_t just_locked,
                                  const apr_array_header_t *changelists,
                                  svn_client_ctx_t *ctx,
-                                 apr_pool_t *pool)
+                                 apr_pool_t *result_pool,
+                                 apr_pool_t *scratch_pool)
 {
   int i;
-  apr_pool_t *iterpool = svn_pool_create(pool);
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   apr_hash_t *changelist_hash = NULL;
+  const char *repos_root_url = NULL;
+  svn_wc_context_t *wc_ctx = ctx->wc_ctx;
 
   /* It's possible that one of the named targets has a parent that is
    * itself scheduled for addition or replacement -- that is, the
@@ -996,24 +985,25 @@ svn_client__harvest_committables(apr_has
    * targets is that they can only join the commit if their parents
    * did too, so this situation can't arise for them.)
    */
-  apr_hash_t *danglers = apr_hash_make(pool);
+  apr_hash_t *danglers = apr_hash_make(scratch_pool);
 
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(base_abspath));
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(base_dir_abspath));
 
   /* Create the COMMITTABLES hash. */
-  *committables = apr_hash_make(pool);
+  *committables = apr_hash_make(result_pool);
 
   /* And the LOCK_TOKENS dito. */
-  *lock_tokens = apr_hash_make(pool);
+  *lock_tokens = apr_hash_make(result_pool);
 
   /* If we have a list of changelists, convert that into a hash with
      changelist keys. */
   if (changelists && changelists->nelts)
-    SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelists, pool));
+    SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelists,
+                                       scratch_pool));
 
   for (i = 0; i < targets->nelts; ++i)
     {
-      const char *url, *target_abspath;
+      const char *repos_relpath, *target_abspath;
       svn_boolean_t is_added;
       svn_node_kind_t kind;
       svn_error_t *err;
@@ -1021,11 +1011,11 @@ svn_client__harvest_committables(apr_has
       svn_pool_clear(iterpool);
 
       /* Add the relative portion to the base abspath.  */
-      target_abspath = svn_dirent_join(base_abspath,
+      target_abspath = svn_dirent_join(base_dir_abspath,
                                        APR_ARRAY_IDX(targets, i, const char *),
                                        iterpool);
 
-      SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath,
+      SVN_ERR(svn_wc_read_kind(&kind, wc_ctx, target_abspath,
                                FALSE, /* show_hidden */
                                iterpool));
       if (kind == svn_node_none)
@@ -1034,26 +1024,34 @@ svn_client__harvest_committables(apr_has
            * has no entry (e.g. locally deleted), issue a proper tree-
            * conflicts error instead of a "not under version control". */
           const svn_wc_conflict_description2_t *conflict;
-          svn_wc__get_tree_conflict(&conflict, ctx->wc_ctx, target_abspath,
-                                    pool, iterpool);
+          svn_wc__get_tree_conflict(&conflict, wc_ctx, target_abspath,
+                                    iterpool, iterpool);
           if (conflict != NULL)
             return svn_error_createf(
                        SVN_ERR_WC_FOUND_CONFLICT, NULL,
                        _("Aborting commit: '%s' remains in conflict"),
-                       svn_dirent_local_style(conflict->local_abspath, pool));
+                       svn_dirent_local_style(conflict->local_abspath,
+                                              iterpool));
           else
             return svn_error_createf(
                        SVN_ERR_ILLEGAL_TARGET, NULL,
                        _("'%s' is not under version control"),
-                       svn_dirent_local_style(target_abspath, pool));
+                       svn_dirent_local_style(target_abspath, iterpool));
         }
 
-      SVN_ERR(svn_wc__node_get_url(&url, ctx->wc_ctx, target_abspath,
-                                   iterpool, iterpool));
-      if (! url)
+      if (!repos_root_url)
+        SVN_ERR(svn_wc__node_get_repos_info(&repos_root_url, NULL, wc_ctx,
+                                            target_abspath, TRUE, TRUE,
+                                            result_pool, iterpool));
+
+      SVN_ERR(svn_wc__node_get_repos_relpath(&repos_relpath, ctx->wc_ctx,
+                                             target_abspath,
+                                             iterpool, iterpool));
+      if (! repos_relpath)
         return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
                                  _("Entry for '%s' has no URL"),
-                                 svn_dirent_local_style(target_abspath, pool));
+                                 svn_dirent_local_style(target_abspath,
+                                                        iterpool));
 
       /* Handle an added/replaced node. */
       SVN_ERR(svn_wc__node_is_added(&is_added, ctx->wc_ctx, target_abspath,
@@ -1066,13 +1064,10 @@ svn_client__harvest_committables(apr_has
           err = svn_wc__node_is_added(&is_added, ctx->wc_ctx, parent_abspath,
                                       iterpool);
           if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-            {
-              svn_error_clear(err);
-              return svn_error_createf(
-                SVN_ERR_WC_CORRUPT, NULL,
+            return svn_error_createf(
+                SVN_ERR_WC_CORRUPT, err,
                 _("'%s' is scheduled for addition within unversioned parent"),
-                svn_dirent_local_style(target_abspath, pool));
-            }
+                svn_dirent_local_style(target_abspath, iterpool));
           SVN_ERR(err);
 
           if (is_added)
@@ -1081,9 +1076,9 @@ svn_client__harvest_committables(apr_has
                  lasts only for this loop iteration, and we check
                  danglers after the loop is over. */
               apr_hash_set(danglers,
-                           apr_pstrdup(pool, parent_abspath),
+                           apr_pstrdup(scratch_pool, parent_abspath),
                            APR_HASH_KEY_STRING,
-                           apr_pstrdup(pool, target_abspath));
+                           apr_pstrdup(scratch_pool, target_abspath));
             }
         }
 
@@ -1094,17 +1089,18 @@ svn_client__harvest_committables(apr_has
                                                iterpool));
 
       SVN_ERR(harvest_committables(*committables, *lock_tokens, target_abspath,
-                                   NULL,
+                                   repos_root_url, NULL,
                                    FALSE, /* ADDS_ONLY */
                                    FALSE, /* COPY_MODE */
                                    FALSE, /* COPY_MODE_ROOT */
                                    depth, just_locked, changelist_hash,
-                                   ctx, iterpool));
+                                   ctx, result_pool, iterpool));
     }
 
   /* Make sure that every path in danglers is part of the commit. */
   SVN_ERR(svn_iter_apr_hash(NULL,
-                            danglers, validate_dangler, *committables, pool));
+                            danglers, validate_dangler, *committables,
+                            iterpool));
 
   svn_pool_destroy(iterpool);
 
@@ -1115,6 +1111,7 @@ struct copy_committables_baton
 {
   svn_client_ctx_t *ctx;
   apr_hash_t *committables;
+  apr_pool_t *result_pool;
 };
 
 static svn_error_t *
@@ -1122,21 +1119,31 @@ harvest_copy_committables(void *baton, v
 {
   struct copy_committables_baton *btn = baton;
   svn_client__copy_pair_t *pair = *(svn_client__copy_pair_t **)item;
+  const char *repos_root_url;
 
   /* Read the entry for this SRC. */
   SVN_ERR_ASSERT(svn_dirent_is_absolute(pair->src_abspath_or_url));
 
-  /* Handle this SRC.  Because add_committable() uses the hash pool to
-     allocate the new commit_item, we can safely use the iterpool here. */
+  SVN_ERR(svn_wc__node_get_repos_info(&repos_root_url, NULL, btn->ctx->wc_ctx,
+                                      pair->src_abspath_or_url, TRUE, TRUE,
+                                      pool, pool));
+
+  /* Handle this SRC. */
   return harvest_committables(btn->committables, NULL,
                               pair->src_abspath_or_url,
-                              pair->dst_abspath_or_url,
+                              repos_root_url,
+                              svn_path_uri_decode(
+                                  svn_uri_skip_ancestor(
+                                            repos_root_url,
+                                            pair->dst_abspath_or_url),
+                                  pool),
                               FALSE, /* ADDS_ONLY */
                               TRUE,  /* COPY_MODE */
                               TRUE,  /* COPY_MODE_ROOT */
                               svn_depth_infinity,
                               FALSE,  /* JUST_LOCKED */
-                              NULL, btn->ctx, pool);
+                              NULL, btn->ctx,
+                              btn->result_pool, pool);
 }
 
 
@@ -1145,19 +1152,21 @@ svn_error_t *
 svn_client__get_copy_committables(apr_hash_t **committables,
                                   const apr_array_header_t *copy_pairs,
                                   svn_client_ctx_t *ctx,
-                                  apr_pool_t *pool)
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool)
 {
   struct copy_committables_baton btn;
 
-  *committables = apr_hash_make(pool);
+  *committables = apr_hash_make(result_pool);
 
   btn.ctx = ctx;
   btn.committables = *committables;
+  btn.result_pool = result_pool;
 
   /* For each copy pair, harvest the committables for that pair into the
      committables hash. */
   return svn_iter_apr_array(NULL, copy_pairs,
-                            harvest_copy_committables, &btn, pool);
+                            harvest_copy_committables, &btn, scratch_pool);
 }
 
 
@@ -1603,7 +1612,6 @@ svn_client__do_commit(const char *base_u
                       const svn_delta_editor_t *editor,
                       void *edit_baton,
                       const char *notify_path_prefix,
-                      apr_hash_t **new_text_base_abspaths,
                       apr_hash_t **md5_checksums,
                       apr_hash_t **sha1_checksums,
                       svn_client_ctx_t *ctx,
@@ -1626,11 +1634,6 @@ svn_client__do_commit(const char *base_u
   }
 #endif /* SVN_CLIENT_COMMIT_DEBUG */
 
-  /* If the caller wants us to track temporary file creation, create a
-     hash to store those paths in. */
-  if (new_text_base_abspaths)
-    *new_text_base_abspaths = apr_hash_make(pool);
-
   /* Ditto for the checksums. */
   if (md5_checksums)
     *md5_checksums = apr_hash_make(pool);
@@ -1666,7 +1669,6 @@ svn_client__do_commit(const char *base_u
     {
       struct file_mod_t *mod = svn__apr_hash_index_val(hi);
       const svn_client_commit_item3_t *item = mod->item;
-      const char *tempfile;
       const svn_checksum_t *new_text_base_md5_checksum;
       const svn_checksum_t *new_text_base_sha1_checksum;
       svn_boolean_t fulltext = FALSE;
@@ -1694,16 +1696,11 @@ svn_client__do_commit(const char *base_u
       if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_ADD)
         fulltext = TRUE;
 
-      SVN_ERR(svn_wc_transmit_text_deltas3(new_text_base_abspaths ? &tempfile
-                                                                  : NULL,
-                                           &new_text_base_md5_checksum,
+      SVN_ERR(svn_wc_transmit_text_deltas3(&new_text_base_md5_checksum,
                                            &new_text_base_sha1_checksum,
                                            ctx->wc_ctx, item_abspath,
                                            fulltext, editor, mod->file_baton,
                                            pool, iterpool));
-      if (new_text_base_abspaths && tempfile)
-        apr_hash_set(*new_text_base_abspaths, item->path, APR_HASH_KEY_STRING,
-                     tempfile);
       if (md5_checksums)
         apr_hash_set(*md5_checksums, item->path, APR_HASH_KEY_STRING,
                      new_text_base_md5_checksum);
@@ -1718,36 +1715,6 @@ svn_client__do_commit(const char *base_u
   return editor->close_edit(edit_baton, pool);
 }
 
-/* Commit callback baton */
-
-struct commit_baton {
-  svn_commit_info_t **info;
-  apr_pool_t *pool;
-};
-
-svn_error_t *svn_client__commit_get_baton(void **baton,
-                                          svn_commit_info_t **info,
-                                          apr_pool_t *pool)
-{
-  struct commit_baton *cb = apr_pcalloc(pool, sizeof(*cb));
-  cb->info = info;
-  cb->pool = pool;
-  *baton = cb;
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *svn_client__commit_callback(const svn_commit_info_t *commit_info,
-                                         void *baton,
-                                         apr_pool_t *pool)
-{
-  struct commit_baton *cb = baton;
-
-  *(cb->info) = svn_commit_info_dup(commit_info, cb->pool);
-
-  return SVN_NO_ERROR;
-}
-
 
 #ifdef SVN_CLIENT_COMMIT_DEBUG
 

Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/copy.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/copy.c Wed Sep 15 19:32:26 2010
@@ -92,18 +92,18 @@ calculate_target_mergeinfo(svn_ra_sessio
   if (local_abspath)
     {
       svn_boolean_t is_added;
-      const char *copyfrom_url;
+      const char *is_copied;
 
       SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
       SVN_ERR(svn_wc__node_is_added(&is_added, ctx->wc_ctx,
                                     local_abspath, pool));
       if (is_added)
-        SVN_ERR(svn_wc__node_get_copyfrom_info(&copyfrom_url, NULL, NULL,
-                                               ctx->wc_ctx, local_abspath,
-                                               pool, pool));
+        SVN_ERR(svn_wc__node_get_copyfrom_info(&is_copied, NULL, NULL,
+                                               NULL, NULL, ctx->wc_ctx,
+                                               local_abspath, pool, pool));
 
-      if (is_added && !copyfrom_url)
+      if (is_added && ! is_copied)
         {
           locally_added = TRUE;
         }
@@ -277,6 +277,7 @@ do_wc_to_wc_copies_with_write_lock(void 
       dst_abspath = svn_dirent_join(pair->dst_parent_abspath, pair->base_name,
                                     iterpool);
       err = svn_wc_copy3(b->ctx->wc_ctx, pair->src_abspath_or_url, dst_abspath,
+                         FALSE /* metadata_only */,
                          b->ctx->cancel_func, b->ctx->cancel_baton,
                          b->ctx->notify_func2, b->ctx->notify_baton2, iterpool);
       if (err)
@@ -310,7 +311,7 @@ do_wc_to_wc_copies(const apr_array_heade
   baton.dst_parent = dst_parent;
   SVN_ERR(svn_wc__call_with_write_lock(do_wc_to_wc_copies_with_write_lock,
                                        &baton, ctx->wc_ctx, dst_parent_abspath,
-                                       pool, pool));
+                                       FALSE, pool, pool));
 
   return SVN_NO_ERROR;
 }
@@ -336,7 +337,7 @@ 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,
+                       dst_abspath, FALSE /* metadata_only */,
                        b->ctx->cancel_func, b->ctx->cancel_baton,
                        b->ctx->notify_func2, b->ctx->notify_baton2,
                        scratch_pool));
@@ -361,7 +362,7 @@ do_wc_to_wc_moves_with_locks1(void *bato
   if (b->lock_dst)
     SVN_ERR(svn_wc__call_with_write_lock(do_wc_to_wc_moves_with_locks2, b,
                                          b->ctx->wc_ctx, b->dst_parent_abspath,
-                                         result_pool, scratch_pool));
+                                         FALSE, result_pool, scratch_pool));
   else
     SVN_ERR(do_wc_to_wc_moves_with_locks2(b, result_pool, scratch_pool));
 
@@ -430,7 +431,7 @@ do_wc_to_wc_moves(const apr_array_header
         SVN_ERR(svn_wc__call_with_write_lock(do_wc_to_wc_moves_with_locks1,
                                              &baton,
                                              ctx->wc_ctx, src_parent_abspath,
-                                             iterpool, iterpool));
+                                             FALSE, iterpool, iterpool));
       else
         SVN_ERR(do_wc_to_wc_moves_with_locks1(&baton, iterpool, iterpool));
 
@@ -444,12 +445,10 @@ do_wc_to_wc_moves(const apr_array_header
 
 
 static svn_error_t *
-wc_to_wc_copy(const apr_array_header_t *copy_pairs,
-              const char *dst_path,
-              svn_boolean_t is_move,
-              svn_boolean_t make_parents,
-              svn_client_ctx_t *ctx,
-              apr_pool_t *pool)
+verify_wc_srcs_and_dsts(const apr_array_header_t *copy_pairs,
+                        svn_boolean_t make_parents,
+                        svn_client_ctx_t *ctx,
+                        apr_pool_t *pool)
 {
   int i;
   apr_pool_t *iterpool = svn_pool_create(pool);
@@ -483,8 +482,8 @@ wc_to_wc_copy(const apr_array_header_t *
           _("Path '%s' already exists"),
           svn_dirent_local_style(pair->dst_abspath_or_url, pool));
 
-      svn_dirent_split(pair->dst_abspath_or_url, &pair->dst_parent_abspath,
-                       &pair->base_name, pool);
+      svn_dirent_split(&pair->dst_parent_abspath, &pair->base_name,
+                       pair->dst_abspath_or_url, pool);
 
       /* Make sure the destination parent is a directory and produce a clear
          error message if it is not. */
@@ -506,11 +505,7 @@ wc_to_wc_copy(const apr_array_header_t *
 
   svn_pool_destroy(iterpool);
 
-  /* Copy or move all targets. */
-  if (is_move)
-    return do_wc_to_wc_moves(copy_pairs, dst_path, ctx, pool);
-  else
-    return do_wc_to_wc_copies(copy_pairs, ctx, pool);
+  return SVN_NO_ERROR;
 }
 
 
@@ -703,7 +698,7 @@ find_absent_parents2(svn_ra_session_t *r
   while (kind == svn_node_none)
     {
       APR_ARRAY_PUSH(new_dirs, const char *) = root_url;
-      svn_uri_split(root_url, &root_url, NULL, pool);
+      root_url = svn_uri_dirname(root_url, pool);
 
       SVN_ERR(svn_ra_reparent(ra_session, root_url, pool));
       SVN_ERR(svn_ra_check_path(ra_session, "", SVN_INVALID_REVNUM, &kind,
@@ -720,10 +715,11 @@ find_absent_parents2(svn_ra_session_t *r
 }
 
 static svn_error_t *
-repos_to_repos_copy(svn_commit_info_t **commit_info_p,
-                    const apr_array_header_t *copy_pairs,
+repos_to_repos_copy(const apr_array_header_t *copy_pairs,
                     svn_boolean_t make_parents,
                     const apr_hash_t *revprop_table,
+                    svn_commit_callback2_t commit_callback,
+                    void *commit_baton,
                     svn_client_ctx_t *ctx,
                     svn_boolean_t is_move,
                     apr_pool_t *pool)
@@ -739,7 +735,6 @@ repos_to_repos_copy(svn_commit_info_t **
   svn_ra_session_t *ra_session = NULL;
   const svn_delta_editor_t *editor;
   void *edit_baton;
-  void *commit_baton;
   struct path_driver_cb_baton cb_baton;
   apr_array_header_t *new_dirs = NULL;
   apr_hash_t *commit_revprops;
@@ -751,7 +746,7 @@ repos_to_repos_copy(svn_commit_info_t **
      be verifying that every one of our copy source and destination
      URLs is or is beneath this sucker's repository root URL as a form
      of a cheap(ish) sanity check.  */
-  SVN_ERR(svn_client__open_ra_session_internal(&ra_session,
+  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL,
                                                first_pair->src_abspath_or_url,
                                                NULL, NULL, FALSE, TRUE,
                                                ctx, pool));
@@ -1115,10 +1110,9 @@ repos_to_repos_copy(svn_commit_info_t **
                                            message, ctx, pool));
 
   /* Fetch RA commit editor. */
-  SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    svn_client__commit_callback,
+                                    commit_callback,
                                     commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
@@ -1151,10 +1145,11 @@ repos_to_repos_copy(svn_commit_info_t **
  * REVPROP_TABLE is ...
  * CTX is ... */
 static svn_error_t *
-wc_to_repos_copy(svn_commit_info_t **commit_info_p,
-                 const apr_array_header_t *copy_pairs,
+wc_to_repos_copy(const apr_array_header_t *copy_pairs,
                  svn_boolean_t make_parents,
                  const apr_hash_t *revprop_table,
+                 svn_commit_callback2_t commit_callback,
+                 void *commit_baton,
                  svn_client_ctx_t *ctx,
                  apr_pool_t *pool)
 {
@@ -1164,7 +1159,6 @@ wc_to_repos_copy(svn_commit_info_t **com
   svn_ra_session_t *ra_session;
   const svn_delta_editor_t *editor;
   void *edit_baton;
-  void *commit_baton;
   apr_hash_t *committables;
   apr_array_header_t *commit_items;
   apr_pool_t *iterpool;
@@ -1205,7 +1199,7 @@ wc_to_repos_copy(svn_commit_info_t **com
    *     It looks like the entire block of code hanging off this comment
    *     is redundant. */
   first_pair = APR_ARRAY_IDX(copy_pairs, 0, svn_client__copy_pair_t *);
-  svn_uri_split(first_pair->dst_abspath_or_url, &top_dst_url, NULL, pool);
+  top_dst_url = svn_uri_dirname(first_pair->dst_abspath_or_url, pool);
   for (i = 1; i < copy_pairs->nelts; i++)
     {
       svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i,
@@ -1216,7 +1210,7 @@ wc_to_repos_copy(svn_commit_info_t **com
     }
 
   SVN_ERR(svn_dirent_get_absolute(&top_src_abspath, top_src_path, pool));
-  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, top_dst_url,
+  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, top_dst_url,
                                                top_src_abspath, NULL, TRUE,
                                                TRUE, ctx, pool));
 
@@ -1302,7 +1296,7 @@ wc_to_repos_copy(svn_commit_info_t **com
   /* Crawl the working copy for commit items. */
   SVN_ERR(svn_client__get_copy_committables(&committables,
                                             copy_pairs,
-                                            ctx, pool));
+                                            ctx, pool, pool));
 
   /* ### todo: There should be only one hash entry, which currently
      has a hacked name until we have the entries files storing
@@ -1387,15 +1381,14 @@ wc_to_repos_copy(svn_commit_info_t **com
                                             commit_items, pool));
 
   /* Open an RA session to DST_URL. */
-  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, top_dst_url,
+  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, top_dst_url,
                                                NULL, commit_items,
                                                FALSE, FALSE, ctx, pool));
 
   /* Fetch RA commit editor. */
-  SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    svn_client__commit_callback,
+                                    commit_callback,
                                     commit_baton, NULL,
                                     TRUE, /* No lock tokens */
                                     pool));
@@ -1404,7 +1397,7 @@ wc_to_repos_copy(svn_commit_info_t **com
   SVN_ERR_W(svn_client__do_commit(top_dst_url, commit_items,
                                   editor, edit_baton,
                                   0, /* ### any notify_path_offset needed? */
-                                  NULL, NULL, NULL, ctx, pool),
+                                  NULL, NULL, ctx, pool),
             _("Commit failed (details follow):"));
 
   /* Sleep to ensure timestamp integrity. */
@@ -1775,8 +1768,9 @@ repos_to_wc_copy(const apr_array_header_
   /* Open a repository session to the longest common src ancestor.  We do not
      (yet) have a working copy, so we don't have a corresponding path and
      tempfiles cannot go into the admin area. */
-  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, top_src_url, NULL,
-                                               NULL, FALSE, TRUE, ctx, pool));
+  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, top_src_url,
+                                               NULL, NULL, FALSE, TRUE,
+                                               ctx, pool));
 
   /* Pass null for the path, to ensure error if trying to get a
      revision based on the working copy.  */
@@ -1859,7 +1853,7 @@ repos_to_wc_copy(const apr_array_header_
 
   SVN_ERR(svn_wc__call_with_write_lock(repos_to_wc_copy_cb, &baton,
                                        ctx->wc_ctx, lock_abspath,
-                                       pool, pool));
+                                       FALSE, pool, pool));
   return SVN_NO_ERROR;
 }
 
@@ -1869,14 +1863,15 @@ repos_to_wc_copy(const apr_array_header_
 
 /* Perform all allocations in POOL. */
 static svn_error_t *
-try_copy(svn_commit_info_t **commit_info_p,
-         const apr_array_header_t *sources,
+try_copy(const apr_array_header_t *sources,
          const char *dst_path_in,
          svn_boolean_t is_move,
          svn_boolean_t force,
          svn_boolean_t make_parents,
          svn_boolean_t ignore_externals,
          const apr_hash_t *revprop_table,
+         svn_commit_callback2_t commit_callback,
+         void *commit_baton,
          svn_client_ctx_t *ctx,
          apr_pool_t *pool)
 {
@@ -2102,8 +2097,8 @@ try_copy(svn_commit_info_t **commit_info
                   SVN_ERR_ASSERT(svn_dirent_is_absolute(pair->src_abspath_or_url));
 
                   SVN_ERR(svn_wc__node_get_copyfrom_info(
-                    &copyfrom_url, &copyfrom_rev, NULL, ctx->wc_ctx,
-                    pair->src_abspath_or_url, pool, iterpool));
+                    NULL, NULL, &copyfrom_url, &copyfrom_rev, NULL,
+                    ctx->wc_ctx, pair->src_abspath_or_url, pool, iterpool));
 
                   if (copyfrom_url)
                     {
@@ -2154,20 +2149,23 @@ try_copy(svn_commit_info_t **commit_info
   /* Now, call the right handler for the operation. */
   if ((! srcs_are_urls) && (! dst_is_url))
     {
-      *commit_info_p = NULL;
-      return svn_error_return(
-        wc_to_wc_copy(copy_pairs, dst_path_in, is_move, make_parents, ctx,
-                      pool));
+      SVN_ERR(verify_wc_srcs_and_dsts(copy_pairs, make_parents, ctx, pool));
+
+      /* Copy or move all targets. */
+      if (is_move)
+        return svn_error_return(do_wc_to_wc_moves(copy_pairs, dst_path_in, ctx,
+                                                  pool));
+      else
+        return svn_error_return(do_wc_to_wc_copies(copy_pairs, ctx, pool));
     }
   else if ((! srcs_are_urls) && (dst_is_url))
     {
       return svn_error_return(
-        wc_to_repos_copy(commit_info_p, copy_pairs, make_parents,
-                         revprop_table, ctx, pool));
+        wc_to_repos_copy(copy_pairs, make_parents, revprop_table,
+                         commit_callback, commit_baton, ctx, pool));
     }
   else if ((srcs_are_urls) && (! dst_is_url))
     {
-      *commit_info_p = NULL;
       return svn_error_return(
         repos_to_wc_copy(copy_pairs, make_parents, ignore_externals,
                          ctx, pool));
@@ -2175,8 +2173,9 @@ try_copy(svn_commit_info_t **commit_info
   else
     {
       return svn_error_return(
-        repos_to_repos_copy(commit_info_p, copy_pairs, make_parents,
-                            revprop_table, ctx, is_move, pool));
+        repos_to_repos_copy(copy_pairs, make_parents, revprop_table,
+                            commit_callback, commit_baton, ctx, is_move,
+                            pool));
     }
 }
 
@@ -2184,31 +2183,31 @@ try_copy(svn_commit_info_t **commit_info
 
 /* Public Interfaces */
 svn_error_t *
-svn_client_copy5(svn_commit_info_t **commit_info_p,
-                 const apr_array_header_t *sources,
+svn_client_copy6(const apr_array_header_t *sources,
                  const char *dst_path,
                  svn_boolean_t copy_as_child,
                  svn_boolean_t make_parents,
                  svn_boolean_t ignore_externals,
                  const apr_hash_t *revprop_table,
+                 svn_commit_callback2_t commit_callback,
+                 void *commit_baton,
                  svn_client_ctx_t *ctx,
                  apr_pool_t *pool)
 {
   svn_error_t *err;
-  svn_commit_info_t *commit_info = NULL;
   apr_pool_t *subpool = svn_pool_create(pool);
 
   if (sources->nelts > 1 && !copy_as_child)
     return svn_error_create(SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED,
                             NULL, NULL);
 
-  err = try_copy(&commit_info,
-                 sources, dst_path,
+  err = try_copy(sources, dst_path,
                  FALSE /* is_move */,
                  TRUE /* force, set to avoid deletion check */,
                  make_parents,
                  ignore_externals,
                  revprop_table,
+                 commit_callback, commit_baton,
                  ctx,
                  subpool);
 
@@ -2232,8 +2231,7 @@ svn_client_copy5(svn_commit_info_t **com
       if (svn_path_is_url(src_path) && ! svn_path_is_url(dst_path))
         src_basename = svn_path_uri_decode(src_basename, subpool);
 
-      err = try_copy(&commit_info,
-                     sources,
+      err = try_copy(sources,
                      dst_is_uri
                          ? svn_uri_join(dst_path, src_basename, subpool)
                          : svn_dirent_join(dst_path, src_basename, subpool),
@@ -2242,35 +2240,28 @@ svn_client_copy5(svn_commit_info_t **com
                      make_parents,
                      ignore_externals,
                      revprop_table,
+                     commit_callback, commit_baton,
                      ctx,
                      subpool);
     }
 
-  if (commit_info_p != NULL)
-    {
-      if (commit_info)
-        *commit_info_p = svn_commit_info_dup(commit_info, pool);
-      else
-        *commit_info_p = NULL;
-    }
-
   svn_pool_destroy(subpool);
   return svn_error_return(err);
 }
 
 
 svn_error_t *
-svn_client_move5(svn_commit_info_t **commit_info_p,
-                 const apr_array_header_t *src_paths,
+svn_client_move6(const apr_array_header_t *src_paths,
                  const char *dst_path,
                  svn_boolean_t force,
                  svn_boolean_t move_as_child,
                  svn_boolean_t make_parents,
                  const apr_hash_t *revprop_table,
+                 svn_commit_callback2_t commit_callback,
+                 void *commit_baton,
                  svn_client_ctx_t *ctx,
                  apr_pool_t *pool)
 {
-  svn_commit_info_t *commit_info = NULL;
   const svn_opt_revision_t head_revision
     = { svn_opt_revision_head, { 0 } };
   svn_error_t *err;
@@ -2296,12 +2287,13 @@ svn_client_move5(svn_commit_info_t **com
       APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = copy_source;
     }
 
-  err = try_copy(&commit_info, sources, dst_path,
+  err = try_copy(sources, dst_path,
                  TRUE /* is_move */,
                  force,
                  make_parents,
                  FALSE,
                  revprop_table,
+                 commit_callback, commit_baton,
                  ctx,
                  subpool);
 
@@ -2322,7 +2314,7 @@ svn_client_move5(svn_commit_info_t **com
       src_basename = src_is_uri ? svn_uri_basename(src_path, pool)
                                 : svn_dirent_basename(src_path, pool);
 
-      err = try_copy(&commit_info, sources,
+      err = try_copy(sources,
                      dst_is_uri
                          ? svn_uri_join(dst_path, src_basename, pool)
                          : svn_dirent_join(dst_path, src_basename, pool),
@@ -2331,18 +2323,11 @@ svn_client_move5(svn_commit_info_t **com
                      make_parents,
                      FALSE,
                      revprop_table,
+                     commit_callback, commit_baton,
                      ctx,
                      subpool);
     }
 
-  if (commit_info_p != NULL)
-    {
-      if (commit_info)
-        *commit_info_p = svn_commit_info_dup(commit_info, pool);
-      else
-        *commit_info_p = commit_info;
-    }
-
   svn_pool_destroy(subpool);
   return svn_error_return(err);
 }

Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/delete.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/delete.c Wed Sep 15 19:32:26 2010
@@ -115,7 +115,7 @@ svn_client__can_delete(const char *path,
      be deleted. */
   return svn_error_return(svn_client_status5(NULL, ctx, path, &revision,
                                              svn_depth_infinity, FALSE,
-                                             FALSE, FALSE, FALSE,
+                                             FALSE, FALSE, FALSE, FALSE,
                                              NULL,
                                              find_undeletables, NULL,
                                              scratch_pool));
@@ -136,16 +136,16 @@ path_driver_cb_func(void **dir_baton,
 
 
 static svn_error_t *
-delete_urls(svn_commit_info_t **commit_info_p,
-            const apr_array_header_t *paths,
+delete_urls(const apr_array_header_t *paths,
             const apr_hash_t *revprop_table,
+            svn_commit_callback2_t commit_callback,
+            void *commit_baton,
             svn_client_ctx_t *ctx,
             apr_pool_t *pool)
 {
   svn_ra_session_t *ra_session = NULL;
   const svn_delta_editor_t *editor;
   void *edit_baton;
-  void *commit_baton;
   const char *log_msg;
   svn_node_kind_t kind;
   apr_array_header_t *targets;
@@ -161,7 +161,7 @@ delete_urls(svn_commit_info_t **commit_i
   if (! targets->nelts)
     {
       const char *bname;
-      svn_uri_split(common, &common, &bname, pool);
+      svn_uri_split(&common, &bname, common, pool);
       APR_ARRAY_PUSH(targets, const char *) = svn_path_uri_decode(bname, pool);
     }
 
@@ -216,9 +216,9 @@ delete_urls(svn_commit_info_t **commit_i
          session.  */
       if (! ra_session)
         {
-          SVN_ERR(svn_client__open_ra_session_internal(&ra_session, item_url,
-                                                       NULL, NULL, FALSE,
-                                                       TRUE, ctx, pool));
+          SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL,
+                                                       item_url, NULL, NULL,
+                                                       FALSE, TRUE, ctx, pool));
         }
       else
         {
@@ -237,10 +237,9 @@ delete_urls(svn_commit_info_t **commit_i
   SVN_ERR(svn_ra_reparent(ra_session, common, pool));
 
   /* Fetch RA commit editor */
-  SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    svn_client__commit_callback,
+                                    commit_callback,
                                     commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
@@ -314,25 +313,41 @@ delete_with_write_lock_func(void *baton,
 }
 
 svn_error_t *
-svn_client_delete3(svn_commit_info_t **commit_info_p,
-                   const apr_array_header_t *paths,
+svn_client_delete4(const apr_array_header_t *paths,
                    svn_boolean_t force,
                    svn_boolean_t keep_local,
                    const apr_hash_t *revprop_table,
+                   svn_commit_callback2_t commit_callback,
+                   void *commit_baton,
                    svn_client_ctx_t *ctx,
                    apr_pool_t *pool)
 {
+  svn_boolean_t is_url;
+  int i;
+
   if (! paths->nelts)
     return SVN_NO_ERROR;
 
-  if (svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *)))
+  /* Check that all targets are of the same type. */
+  is_url = svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *));
+  for (i = 1; i < paths->nelts; i++)
+    {
+      const char *path = APR_ARRAY_IDX(paths, i, const char *);
+      if (is_url != svn_path_is_url(path))
+        return svn_error_return(
+                 svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                  _("Cannot mix repository and working copy "
+                                    "targets")));
+    }
+
+  if (is_url)
     {
-      SVN_ERR(delete_urls(commit_info_p, paths, revprop_table, ctx, pool));
+      SVN_ERR(delete_urls(paths, revprop_table, commit_callback, commit_baton,
+                          ctx, pool));
     }
   else
     {
       apr_pool_t *subpool = svn_pool_create(pool);
-      int i;
 
       for (i = 0; i < paths->nelts; i++)
         {
@@ -353,7 +368,8 @@ svn_client_delete3(svn_commit_info_t **c
           dwwlb.ctx = ctx;
           SVN_ERR(svn_wc__call_with_write_lock(delete_with_write_lock_func,
                                                &dwwlb, ctx->wc_ctx,
-                                               local_abspath, pool, subpool));
+                                               local_abspath, TRUE,
+                                               pool, subpool));
         }
       svn_pool_destroy(subpool);
     }

Modified: subversion/branches/py-tests-as-modules/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/libsvn_client/deprecated.c?rev=997472&r1=997471&r2=997472&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/libsvn_client/deprecated.c Wed Sep 15 19:32:26 2010
@@ -50,6 +50,29 @@
 
 /*** Code. ***/
 
+
+/* Baton for capture_commit_info() */
+struct capture_baton_t {
+  svn_commit_info_t **info;
+  apr_pool_t *pool;
+};
+
+
+/* Callback which implements svn_commit_callback2_t for use with some
+   backward compat functions. */
+static svn_error_t *
+capture_commit_info(const svn_commit_info_t *commit_info,
+                    void *baton,
+                    apr_pool_t *pool)
+{
+  struct capture_baton_t *cb = baton;
+
+  *(cb->info) = svn_commit_info_dup(commit_info, cb->pool);
+
+  return SVN_NO_ERROR;
+}
+
+
 /*** From add.c ***/
 svn_error_t *
 svn_client_add3(const char *path,
@@ -83,7 +106,22 @@ svn_client_add(const char *path,
   return svn_client_add3(path, recursive, FALSE, FALSE, ctx, pool);
 }
 
+svn_error_t *
+svn_client_mkdir3(svn_commit_info_t **commit_info_p,
+                  const apr_array_header_t *paths,
+                  svn_boolean_t make_parents,
+                  const apr_hash_t *revprop_table,
+                  svn_client_ctx_t *ctx,
+                  apr_pool_t *pool)
+{
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
 
+  return svn_client_mkdir4(paths, make_parents, revprop_table,
+                           capture_commit_info, &cb, ctx, pool);
+}
 
 svn_error_t *
 svn_client_mkdir2(svn_commit_info_t **commit_info_p,
@@ -279,7 +317,7 @@ wrapped_receiver(void *baton,
   struct wrapped_receiver_baton_s *b = baton;
   svn_stringbuf_t *expanded_line = svn_stringbuf_create(line, pool);
 
-  svn_stringbuf_appendbytes(expanded_line, "\r", 1);
+  svn_stringbuf_appendbyte(expanded_line, '\r');
 
   return b->orig_receiver(b->orig_baton, line_no, revision, author,
                           date, expanded_line->data, pool);
@@ -333,6 +371,27 @@ svn_client_blame(const char *target,
 
 /*** From commit.c ***/
 svn_error_t *
+svn_client_import3(svn_commit_info_t **commit_info_p,
+                   const char *path,
+                   const char *url,
+                   svn_depth_t depth,
+                   svn_boolean_t no_ignore,
+                   svn_boolean_t ignore_unknown_node_types,
+                   const apr_hash_t *revprop_table,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *pool)
+{
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+
+  return svn_client_import4(path, url, depth, no_ignore,
+                            ignore_unknown_node_types, revprop_table,
+                            capture_commit_info, &cb, ctx, pool);
+}
+
+svn_error_t *
 svn_client_import2(svn_commit_info_t **commit_info_p,
                    const char *path,
                    const char *url,
@@ -367,6 +426,33 @@ svn_client_import(svn_client_commit_info
 }
 
 svn_error_t *
+svn_client_commit4(svn_commit_info_t **commit_info_p,
+                   const apr_array_header_t *targets,
+                   svn_depth_t depth,
+                   svn_boolean_t keep_locks,
+                   svn_boolean_t keep_changelists,
+                   const apr_array_header_t *changelists,
+                   const apr_hash_t *revprop_table,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *pool)
+{
+  struct capture_baton_t cb;
+
+  *commit_info_p = NULL;
+  cb.info = commit_info_p;
+  cb.pool = pool;
+
+  SVN_ERR(svn_client_commit5(targets, depth, keep_locks, keep_changelists,
+                             changelists, revprop_table,
+                             capture_commit_info, &cb, ctx, pool));
+
+  if (! *commit_info_p)
+    *commit_info_p = svn_create_commit_info(pool);
+
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
 svn_client_commit3(svn_commit_info_t **commit_info_p,
                    const apr_array_header_t *targets,
                    svn_boolean_t recurse,
@@ -412,6 +498,26 @@ svn_client_commit(svn_client_commit_info
 }
 
 /*** From copy.c ***/
+svn_error_t *
+svn_client_copy5(svn_commit_info_t **commit_info_p,
+                 const apr_array_header_t *sources,
+                 const char *dst_path,
+                 svn_boolean_t copy_as_child,
+                 svn_boolean_t make_parents,
+                 svn_boolean_t ignore_externals,
+                 const apr_hash_t *revprop_table,
+                 svn_client_ctx_t *ctx,
+                 apr_pool_t *pool)
+{
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+
+  return svn_client_copy6(sources, dst_path, copy_as_child, make_parents,
+                          ignore_externals, revprop_table,
+                          capture_commit_info, &cb, ctx, pool);
+}
 
 svn_error_t *
 svn_client_copy4(svn_commit_info_t **commit_info_p,
@@ -499,6 +605,27 @@ svn_client_copy(svn_client_commit_info_t
 }
 
 svn_error_t *
+svn_client_move5(svn_commit_info_t **commit_info_p,
+                 const apr_array_header_t *src_paths,
+                 const char *dst_path,
+                 svn_boolean_t force,
+                 svn_boolean_t move_as_child,
+                 svn_boolean_t make_parents,
+                 const apr_hash_t *revprop_table,
+                 svn_client_ctx_t *ctx,
+                 apr_pool_t *pool)
+{
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+
+  return svn_client_move6(src_paths, dst_path, force, move_as_child,
+                          make_parents, revprop_table,
+                          capture_commit_info, &cb, ctx, pool);
+}
+
+svn_error_t *
 svn_client_move4(svn_commit_info_t **commit_info_p,
                  const char *src_path,
                  const char *dst_path,
@@ -591,6 +718,24 @@ svn_client_move(svn_client_commit_info_t
 
 /*** From delete.c ***/
 svn_error_t *
+svn_client_delete3(svn_commit_info_t **commit_info_p,
+                   const apr_array_header_t *paths,
+                   svn_boolean_t force,
+                   svn_boolean_t keep_local,
+                   const apr_hash_t *revprop_table,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *pool)
+{
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+
+  return svn_client_delete4(paths, force, keep_local, revprop_table,
+                            capture_commit_info, &cb, ctx, pool);
+}
+
+svn_error_t *
 svn_client_delete2(svn_commit_info_t **commit_info_p,
                    const apr_array_header_t *paths,
                    svn_boolean_t force,
@@ -640,7 +785,7 @@ svn_client_diff4(const apr_array_header_
   return svn_client_diff5(options, path1, revision1, path2,
                           revision2, relative_to_dir, depth,
                           ignore_ancestry, no_diff_deleted, FALSE,
-                          ignore_content_type, header_encoding,
+                          FALSE, ignore_content_type, header_encoding,
                           outfile, errfile, changelists, ctx, pool);
 }
 
@@ -736,6 +881,7 @@ svn_client_diff_peg4(const apr_array_hea
                               ignore_ancestry,
                               no_diff_deleted,
                               FALSE,
+                              FALSE,
                               ignore_content_type,
                               header_encoding,
                               outfile,
@@ -1280,6 +1426,29 @@ svn_client_merge_peg(const char *source,
 
 /*** From prop_commands.c ***/
 svn_error_t *
+svn_client_propset3(svn_commit_info_t **commit_info_p,
+                    const char *propname,
+                    const svn_string_t *propval,
+                    const char *target,
+                    svn_depth_t depth,
+                    svn_boolean_t skip_checks,
+                    svn_revnum_t base_revision_for_url,
+                    const apr_array_header_t *changelists,
+                    const apr_hash_t *revprop_table,
+                    svn_client_ctx_t *ctx,
+                    apr_pool_t *pool)
+{
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+
+  return svn_client_propset4(propname, propval, target, depth, skip_checks,
+                             base_revision_for_url, changelists, revprop_table,
+                             capture_commit_info, &cb, ctx, pool);
+}
+
+svn_error_t *
 svn_client_propset2(const char *propname,
                     const svn_string_t *propval,
                     const char *target,
@@ -1473,8 +1642,8 @@ svn_client_status4(svn_revnum_t *result_
                                        status_baton };
 
   return svn_client_status5(result_rev, ctx, path, revision, depth, get_all,
-                            update, no_ignore, ignore_externals, changelists,
-                            status4_wrapper_func, &swb, pool);
+                            update, no_ignore, ignore_externals, TRUE,
+                            changelists, status4_wrapper_func, &swb, pool);
 }
 
 struct status3_wrapper_baton



Mime
View raw message