subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r980551 [2/10] - in /subversion/branches/issue-2779-dev: ./ build/generator/ notes/tree-conflicts/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ subversion...
Date Thu, 29 Jul 2010 19:38:49 GMT
Modified: subversion/branches/issue-2779-dev/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/include/svn_wc.h?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/include/svn_wc.h (original)
+++ subversion/branches/issue-2779-dev/subversion/include/svn_wc.h Thu Jul 29 19:38:44 2010
@@ -1271,6 +1271,10 @@ typedef struct svn_wc_notify_t {
    * @since New in 1.7 */
   int hunk_fuzz;
 
+  /** If @c action relates to hunks, specifies whether the hunk is a
+   * property hunk or not. */
+  svn_boolean_t is_prop_hunk;
+
   /* NOTE: Add new fields at the end to preserve binary compatibility.
      Also, if you add fields here, you have to update svn_wc_create_notify
      and svn_wc_dup_notify. */
@@ -4220,12 +4224,15 @@ svn_wc_status_set_repos_locks(void *set_
  * is used for accessing the working copy and must contain a write lock for
  * the parent directory of @a dst_abspath,
  *
+ * If metadata_only is TRUE then this a database only operation and
+ * the working directories and files are not copied.
+ *
  * @a src_abspath must be a file or directory under version control;
  * the parent of @a dst_abspath must be a directory under version control
  * in the same working copy; @a dst_abspath will be the name of the copied
- * item, and it must not exist already.  Note that when @a src points to a
- * versioned file, the working file doesn't necessarily exist in which case
- * its text-base is used instead.
+ * item, and it must not exist already if metadata_only is FALSE.  Note that
+ * when @a src points to a versioned file, the working file doesn't
+ * necessarily exist in which case its text-base is used instead.
  *
  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
  * various points during the operation.  If it returns an error
@@ -4248,6 +4255,7 @@ svn_error_t *
 svn_wc_copy3(svn_wc_context_t *wc_ctx,
              const char *src_abspath,
              const char *dst_abspath,
+             svn_boolean_t metadata_only,
              svn_cancel_func_t cancel_func,
              void *cancel_baton,
              svn_wc_notify_func2_t notify_func,
@@ -5730,11 +5738,14 @@ svn_wc_get_pristine_props(apr_hash_t **p
                           apr_pool_t *scratch_pool);
                           
 
-/** Set @a *value to the value of property @a name for @a path, allocating
- * @a *value in @a pool.  If no such prop, set @a *value to @c NULL.
- * @a name may be a regular or wc property; if it is an entry property,
- * return the error #SVN_ERR_BAD_PROP_KIND.  @a adm_access is an access
- * baton set that contains @a path.
+/** Set @a *value to the value of property @a name for @a local_abspath,
+ * allocating @a *value in @a result_pool.  If no such prop, set @a *value
+ * to @c NULL. @a name may be a regular or wc property; if it is an
+ * entry property, return the error #SVN_ERR_BAD_PROP_KIND.  @a wc_ctx
+ * is used to access the working copy.
+ *
+ * If @a local_abspath is not a versioned path, return
+ * #SVN_ERR_WC_PATH_NOT_FOUND
  *
  * @since New in 1.7.
  */
@@ -5749,6 +5760,8 @@ svn_wc_prop_get2(const svn_string_t **va
 /** Similar to svn_wc_prop_get2(), but with a #svn_wc_adm_access_t /
  * relative path parameter pair.
  *
+ * When @a path is not versioned, set @a *value to NULL.
+ *
  * @deprecated Provided for backwards compatibility with the 1.6 API.
  */
 SVN_DEPRECATED
@@ -7080,14 +7093,6 @@ svn_wc_translated_stream(svn_stream_t **
  * matching @a file_baton) through @a editor, then close @a file_baton
  * afterwards.  Use @a scratch_pool for any temporary allocation.
  *
- * If @a tempfile is non-NULL, make a copy of @a local_abspath with keywords
- * and eol translated to repository-normal form, and set @a *tempfile to the
- * absolute path to this copy, allocated in @a result_pool.  The copy will
- * be in the temporary-text-base directory.  Do not clean up the copy;
- * caller can do that.  (The purpose of handing back the tmp copy is that it
- * is usually about to become the new text base anyway, but the installation
- * of the new text base is outside the scope of this function.)
- *
  * If @a new_text_base_md5_checksum is non-NULL, set
  * @a *new_text_base_md5_checksum to the MD5 checksum of (@a local_abspath
  * translated to repository-normal form), allocated in @a result_pool.
@@ -7111,8 +7116,7 @@ svn_wc_translated_stream(svn_stream_t **
  * @since New in 1.7.
  */
 svn_error_t *
-svn_wc_transmit_text_deltas3(const char **tempfile,
-                             const svn_checksum_t **new_text_base_md5_checksum,
+svn_wc_transmit_text_deltas3(const svn_checksum_t **new_text_base_md5_checksum,
                              const svn_checksum_t **new_text_base_sha1_checksum,
                              svn_wc_context_t *wc_ctx,
                              const char *local_abspath,
@@ -7126,6 +7130,14 @@ svn_wc_transmit_text_deltas3(const char 
  * and adm_access baton, and the checksum output is an MD5 digest instead of
  * two svn_checksum_t objects.
  *
+ * If @a tempfile is non-NULL, make a copy of @a path with keywords
+ * and eol translated to repository-normal form, and set @a *tempfile to the
+ * absolute path to this copy, allocated in @a result_pool.  The copy will
+ * be in the temporary-text-base directory.  Do not clean up the copy;
+ * caller can do that.  (The purpose of handing back the tmp copy is that it
+ * is usually about to become the new text base anyway, but the installation
+ * of the new text base is outside the scope of this function.)
+ *
  * @since New in 1.4.
  * @deprecated Provided for backwards compatibility with the 1.6 API.
  */

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/add.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/add.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/add.c Thu Jul 29 19:38:44 2010
@@ -542,7 +542,7 @@ add_parent_dirs(svn_client_ctx_t *ctx,
                          scratch_pool));
 
   if (!own_lock)
-    SVN_ERR(svn_wc__acquire_write_lock(NULL, wc_ctx, parent_abspath,
+    SVN_ERR(svn_wc__acquire_write_lock(NULL, wc_ctx, parent_abspath, FALSE,
                                        scratch_pool, scratch_pool));
 
   SVN_ERR(svn_wc_add4(wc_ctx, local_abspath, svn_depth_infinity,
@@ -607,7 +607,8 @@ svn_client_add4(const char *path,
   baton.no_ignore = no_ignore;
   baton.ctx = ctx;
   SVN_ERR(svn_wc__call_with_write_lock(add, &baton, ctx->wc_ctx,
-                                       parent_abspath, pool, pool));
+                                       parent_abspath, FALSE,
+                                       pool, pool));
   return SVN_NO_ERROR;
 }
 
@@ -652,8 +653,7 @@ add_url_parents(svn_ra_session_t *ra_ses
 }
 
 static svn_error_t *
-mkdir_urls(svn_commit_info_t **commit_info_p,
-           const apr_array_header_t *urls,
+mkdir_urls(const apr_array_header_t *urls,
            svn_boolean_t make_parents,
            const apr_hash_t *revprop_table,
            svn_client_ctx_t *ctx,
@@ -662,7 +662,6 @@ mkdir_urls(svn_commit_info_t **commit_in
   svn_ra_session_t *ra_session = NULL;
   const svn_delta_editor_t *editor;
   void *edit_baton;
-  void *commit_baton;
   const char *log_msg;
   apr_array_header_t *targets;
   apr_hash_t *targets_hash;
@@ -804,11 +803,10 @@ mkdir_urls(svn_commit_info_t **commit_in
     }
 
   /* 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_baton,
+                                    ctx->commit_callback2,
+                                    ctx->commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
 
@@ -866,8 +864,7 @@ svn_client__make_local_parents(const cha
 
 
 svn_error_t *
-svn_client_mkdir3(svn_commit_info_t **commit_info_p,
-                  const apr_array_header_t *paths,
+svn_client_mkdir4(const apr_array_header_t *paths,
                   svn_boolean_t make_parents,
                   const apr_hash_t *revprop_table,
                   svn_client_ctx_t *ctx,
@@ -878,8 +875,7 @@ svn_client_mkdir3(svn_commit_info_t **co
 
   if (svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *)))
     {
-      SVN_ERR(mkdir_urls(commit_info_p, paths, make_parents,
-                         revprop_table, ctx, pool));
+      SVN_ERR(mkdir_urls(paths, make_parents, revprop_table, ctx, pool));
     }
   else
     {

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_client/changelist.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/changelist.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/changelist.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/changelist.c Thu Jul 29 19:38:44 2010
@@ -36,6 +36,7 @@
 
 #include "client.h"
 #include "private/svn_wc_private.h"
+#include "svn_private_config.h"
 
 
 /* Entry-walker callback for svn_client_add_to_changelist() and
@@ -71,7 +72,11 @@ set_node_changelist(const char *local_ab
   /* We only care about files right now. */
   if (kind != svn_node_file)
     {
-      if (b->ctx->notify_func2)
+      /* Notify, unless it's a directory being removed from a changelist.
+         (That is in order to not spam during 'svn cl --remove -R'.)
+       */
+      if (b->ctx->notify_func2
+          && ! (b->changelist == NULL && kind == svn_node_dir))
         b->ctx->notify_func2(b->ctx->notify_baton2,
                              svn_wc_create_notify(local_abspath,
                                                   svn_wc_notify_skip,
@@ -102,6 +107,16 @@ svn_client_add_to_changelist(const apr_a
   apr_hash_t *changelist_hash = NULL;
   int i;
 
+  for (i = 0; i < paths->nelts; i++)
+    {
+      const char *path = APR_ARRAY_IDX(paths, i, const char *);
+      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));
+    }
+
   if (changelists && changelists->nelts)
     SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelists, pool));
 
@@ -144,6 +159,16 @@ svn_client_remove_from_changelists(const
   apr_hash_t *changelist_hash = NULL;
   int i;
 
+  for (i = 0; i < paths->nelts; i++)
+    {
+      const char *path = APR_ARRAY_IDX(paths, i, const char *);
+      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));
+    }
+
   if (changelists && changelists->nelts)
     SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelists, pool));
 

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/cleanup.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/cleanup.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/cleanup.c Thu Jul 29 19:38:44 2010
@@ -32,6 +32,7 @@
 #include "svn_client.h"
 #include "svn_config.h"
 #include "svn_dirent_uri.h"
+#include "svn_path.h"
 #include "svn_pools.h"
 #include "client.h"
 #include "svn_props.h"
@@ -50,6 +51,11 @@ svn_client_cleanup(const char *path,
   const char *local_abspath;
   svn_error_t *err;
 
+  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, scratch_pool));
 
   err = svn_wc_cleanup3(ctx->wc_ctx, local_abspath, ctx->cancel_func,

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/client.h?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/client.h (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/client.h Thu Jul 29 19:38:44 2010
@@ -390,23 +390,6 @@ svn_client__open_ra_session_internal(svn
 
 /* ---------------------------------------------------------------- */
 
-/*** Commit ***/
-
-/* Get the commit_baton to be used in couple with commit_callback. */
-svn_error_t *svn_client__commit_get_baton(void **baton,
-                                          svn_commit_info_t **info,
-                                          apr_pool_t *pool);
-
-/* The commit_callback function for storing svn_client_commit_info_t
-   pointed by commit_baton. If the commit_info supplied by get_baton
-   points to NULL after close_edit, it means the commit is a no-op.
-*/
-svn_error_t *svn_client__commit_callback(const svn_commit_info_t *commit_info,
-                                         void *baton,
-                                         apr_pool_t *pool);
-
-/* ---------------------------------------------------------------- */
-
 /*** Status ***/
 
 /* Verify that the path can be deleted without losing stuff,
@@ -913,12 +896,6 @@ svn_client__condense_commit_items(const 
    NOTIFY_PATH_PREFIX will be passed to CTX->notify_func2() as the
    common absolute path prefix of the committed paths.  It can be NULL.
 
-   If NEW_TEXT_BASE_ABSPATHS is not NULL, create in the temporary-text-base
-   directory a copy of the working version of each file transmitted, but
-   with keywords and eol translated to repository-normal form, and set
-   *NEW_TEXT_BASE_ABSPATHS to a hash that maps (const char *) paths (from
-   the items' paths) to the (const char *) abspaths of these files.
-
    If MD5_CHECKSUMS is not NULL, set *MD5_CHECKSUMS to a hash containing,
    for each file transmitted, a mapping from the commit-item's (const
    char *) path to the (const svn_checksum_t *) MD5 checksum of its new text
@@ -932,7 +909,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,
@@ -1002,6 +978,8 @@ svn_client__handle_externals(apr_hash_t 
    behaves as for svn_client__handle_externals(), except that ambient
    depths are presumed to be svn_depth_infinity.
 
+   NATIVE_EOL is the value passed as NATIVE_EOL when exporting.
+
    *TIMESTAMP_SLEEP will be set TRUE if a sleep is required to ensure
    timestamp integrity, *TIMESTAMP_SLEEP will be unchanged if no sleep
    is required.
@@ -1014,6 +992,7 @@ svn_client__fetch_externals(apr_hash_t *
                             const char *repos_root_url,
                             svn_depth_t requested_depth,
                             svn_boolean_t is_export,
+                            const char *native_eol,
                             svn_boolean_t *timestamp_sleep,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool);

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/commit.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/commit.c Thu Jul 29 19:38:44 2010
@@ -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,6 +592,31 @@ 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,
@@ -602,13 +627,13 @@ get_ra_editor(svn_ra_session_t **ra_sess
               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;
 
   /* Open an RA session to URL. */
@@ -635,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);
 }
@@ -647,8 +670,7 @@ 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,
@@ -737,8 +759,9 @@ svn_client_import3(svn_commit_info_t **c
     }
   while ((err = get_ra_editor(&ra_session,
                               &editor, &edit_baton, ctx, url, base_dir_abspath,
-                              log_msg, NULL, revprop_table,
-                              commit_info_p, FALSE, NULL, TRUE, subpool)));
+                              log_msg, NULL, revprop_table, FALSE, NULL, TRUE,
+                              ctx->commit_callback2, ctx->commit_baton,
+                              subpool)));
 
   /* Reverse the order of the components we added to our NEW_ENTRIES array. */
   if (new_entries->nelts)
@@ -793,59 +816,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
@@ -885,17 +871,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;
 }
 
@@ -1050,8 +1025,7 @@ 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,
@@ -1062,6 +1036,7 @@ svn_client_commit4(svn_commit_info_t **c
 {
   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;
@@ -1070,13 +1045,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;
@@ -1098,13 +1073,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);
 
@@ -1130,7 +1099,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
@@ -1223,11 +1192,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 = ctx->commit_callback2;
+  cb.original_baton = ctx->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. */
@@ -1235,7 +1209,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. */
@@ -1268,12 +1242,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);
     }
 
@@ -1291,17 +1265,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/issue-2779-dev/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/commit_util.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/commit_util.c Thu Jul 29 19:38:44 2010
@@ -1654,7 +1654,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,
@@ -1677,11 +1676,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);
@@ -1717,7 +1711,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;
@@ -1745,16 +1738,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);
@@ -1769,36 +1757,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/issue-2779-dev/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/copy.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/copy.c Thu Jul 29 19:38:44 2010
@@ -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));
 
@@ -720,8 +721,7 @@ 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_client_ctx_t *ctx,
@@ -739,7 +739,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;
@@ -1115,11 +1114,10 @@ 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_baton,
+                                    ctx->commit_callback2,
+                                    ctx->commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
 
@@ -1151,8 +1149,7 @@ 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_client_ctx_t *ctx,
@@ -1164,7 +1161,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;
@@ -1392,11 +1388,10 @@ wc_to_repos_copy(svn_commit_info_t **com
                                                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_baton, NULL,
+                                    ctx->commit_callback2,
+                                    ctx->commit_baton, NULL,
                                     TRUE, /* No lock tokens */
                                     pool));
 
@@ -1404,7 +1399,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. */
@@ -1860,7 +1855,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;
 }
 
@@ -1870,8 +1865,7 @@ 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,
@@ -2155,7 +2149,6 @@ 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));
@@ -2163,12 +2156,10 @@ try_copy(svn_commit_info_t **commit_info
   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, 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));
@@ -2176,7 +2167,7 @@ try_copy(svn_commit_info_t **commit_info
   else
     {
       return svn_error_return(
-        repos_to_repos_copy(commit_info_p, copy_pairs, make_parents,
+        repos_to_repos_copy(copy_pairs, make_parents,
                             revprop_table, ctx, is_move, pool));
     }
 }
@@ -2185,8 +2176,7 @@ 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,
@@ -2196,15 +2186,13 @@ svn_client_copy5(svn_commit_info_t **com
                  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,
@@ -2233,8 +2221,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),
@@ -2247,22 +2234,13 @@ svn_client_copy5(svn_commit_info_t **com
                      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,
@@ -2271,7 +2249,6 @@ svn_client_move5(svn_commit_info_t **com
                  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;
@@ -2297,7 +2274,7 @@ 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,
@@ -2323,7 +2300,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),
@@ -2336,14 +2313,6 @@ svn_client_move5(svn_commit_info_t **com
                      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/issue-2779-dev/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/delete.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/delete.c Thu Jul 29 19:38:44 2010
@@ -136,8 +136,7 @@ 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_client_ctx_t *ctx,
             apr_pool_t *pool)
@@ -145,7 +144,6 @@ delete_urls(svn_commit_info_t **commit_i
   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;
@@ -237,11 +235,10 @@ 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_baton,
+                                    ctx->commit_callback2,
+                                    ctx->commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
 
@@ -314,8 +311,7 @@ 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,
@@ -327,7 +323,7 @@ svn_client_delete3(svn_commit_info_t **c
 
   if (svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *)))
     {
-      SVN_ERR(delete_urls(commit_info_p, paths, revprop_table, ctx, pool));
+      SVN_ERR(delete_urls(paths, revprop_table, ctx, pool));
     }
   else
     {
@@ -353,7 +349,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/issue-2779-dev/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/deprecated.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/deprecated.c Thu Jul 29 19:38:44 2010
@@ -50,6 +50,39 @@
 
 /*** Code. ***/
 
+
+/* Baton for capture_commit_info() */
+struct capture_baton_t {
+  svn_commit_callback2_t original_callback;
+  void *original_baton;
+
+  svn_commit_info_t **info;
+  apr_pool_t *pool;
+
+  svn_boolean_t saw_commit;
+};
+
+
+/* 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);
+
+  if (cb->original_callback)
+    SVN_ERR((cb->original_callback)(commit_info, cb->original_baton, pool));
+
+  cb->saw_commit = TRUE;
+
+  return SVN_NO_ERROR;
+}
+
+
 /*** From add.c ***/
 svn_error_t *
 svn_client_add3(const char *path,
@@ -83,7 +116,29 @@ 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)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
 
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_mkdir4(paths, make_parents, revprop_table, &shadow_ctx,
+                           pool);
+}
 
 svn_error_t *
 svn_client_mkdir2(svn_commit_info_t **commit_info_p,
@@ -333,6 +388,34 @@ 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)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_import4(path, url, depth, no_ignore,
+                            ignore_unknown_node_types, revprop_table,
+                            &shadow_ctx, pool);
+}
+
+svn_error_t *
 svn_client_import2(svn_commit_info_t **commit_info_p,
                    const char *path,
                    const char *url,
@@ -367,6 +450,39 @@ 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)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+  cb.saw_commit = FALSE;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  SVN_ERR(svn_client_commit5(targets, depth, keep_locks, keep_changelists,
+                             changelists, revprop_table, &shadow_ctx, pool));
+
+  if (!cb.saw_commit)
+    *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 +528,32 @@ 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)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_copy6(sources, dst_path, copy_as_child, make_parents,
+                          ignore_externals, revprop_table, &shadow_ctx, pool);
+}
 
 svn_error_t *
 svn_client_copy4(svn_commit_info_t **commit_info_p,
@@ -499,6 +641,33 @@ 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)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_move6(src_paths, dst_path, force, move_as_child,
+                          make_parents, revprop_table, &shadow_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 +760,31 @@ 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)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_delete4(paths, force, keep_local, revprop_table,
+                            &shadow_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,
@@ -1281,6 +1475,36 @@ 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)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_propset4(propname, propval, target, depth, skip_checks,
+                             base_revision_for_url, changelists, revprop_table,
+                             &shadow_ctx, pool);
+}
+
+svn_error_t *
 svn_client_propset2(const char *propname,
                     const svn_string_t *propval,
                     const char *target,

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/export.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/export.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/export.c Thu Jul 29 19:38:44 2010
@@ -1083,7 +1083,8 @@ svn_client_export5(svn_revnum_t *result_
               SVN_ERR(svn_client__fetch_externals(eb->externals,
                                                   from, to_abspath,
                                                   repos_root_url, depth, TRUE,
-                                                  &use_sleep, ctx, pool));
+                                                  native_eol, &use_sleep,
+                                                  ctx, pool));
             }
         }
       else if (kind == svn_node_none)

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/externals.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/externals.c Thu Jul 29 19:38:44 2010
@@ -62,6 +62,9 @@ struct handle_external_item_change_baton
   /* Passed through to svn_client_* functions. */
   svn_client_ctx_t *ctx;
 
+  /* Passed to svn_client_exportX() */
+  const char *native_eol;
+
   svn_boolean_t *timestamp_sleep;
   svn_boolean_t is_export;
 
@@ -274,9 +277,10 @@ switch_dir_external(const char *path,
       baton.cancel_baton = ctx->cancel_baton;
 
       /* Buh-bye, old and busted ... */
-      SVN_ERR(svn_wc__call_with_write_lock(relegate_dir_external, &baton,
-                                           ctx->wc_ctx, local_abspath,
-                                           pool, pool));
+      SVN_ERR(svn_wc__acquire_write_lock(NULL, ctx->wc_ctx, local_abspath,
+                                         FALSE, pool, pool));
+      
+      SVN_ERR(relegate_dir_external(&baton, pool, pool));
     }
   else
     {
@@ -362,7 +366,7 @@ switch_file_external(const char *path,
            url, dest_wc_repos_root_url);
 
       SVN_ERR(svn_wc__acquire_write_lock(NULL, ctx->wc_ctx, anchor_abspath,
-                                         subpool, subpool));
+                                         FALSE, subpool, subpool));
     }
 
   err = svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE, subpool);
@@ -854,7 +858,8 @@ handle_external_item_change(const void *
             SVN_ERR(svn_client_export4(NULL, new_item->url, local_abspath,
                                        &(new_item->peg_revision),
                                        &(new_item->revision),
-                                       TRUE, FALSE, svn_depth_infinity, NULL,
+                                       TRUE, FALSE, svn_depth_infinity, 
+                                       ib->native_eol,
                                        ib->ctx, ib->iter_pool));
           else
             SVN_ERR(svn_client__checkout_internal
@@ -909,7 +914,7 @@ handle_external_item_change(const void *
       if (! lock_existed)
         {
           SVN_ERR(svn_wc__acquire_write_lock(NULL, ib->ctx->wc_ctx,
-                                             local_abspath,
+                                             local_abspath, FALSE,
                                              ib->iter_pool,
                                              ib->iter_pool));
         }
@@ -1067,6 +1072,9 @@ struct handle_externals_desc_change_bato
   svn_boolean_t *timestamp_sleep;
   svn_boolean_t is_export;
 
+  /* Passed to svn_client_exportX() */
+  const char *native_eol;
+
   apr_pool_t *pool;
 };
 
@@ -1157,6 +1165,7 @@ handle_externals_desc_change(const void 
   ib.repos_root_url    = cb->repos_root_url;
   ib.ctx               = cb->ctx;
   ib.is_export         = cb->is_export;
+  ib.native_eol        = cb->native_eol;
   ib.timestamp_sleep   = cb->timestamp_sleep;
   ib.pool              = cb->pool;
   ib.iter_pool         = svn_pool_create(cb->pool);
@@ -1261,6 +1270,7 @@ svn_client__handle_externals(apr_hash_t 
   cb.ctx               = ctx;
   cb.timestamp_sleep   = timestamp_sleep;
   cb.is_export         = FALSE;
+  cb.native_eol        = NULL;
   cb.pool              = pool;
 
   return svn_hash_diff(cb.externals_old, cb.externals_new,
@@ -1275,6 +1285,7 @@ svn_client__fetch_externals(apr_hash_t *
                             const char *repos_root_url,
                             svn_depth_t requested_depth,
                             svn_boolean_t is_export,
+                            const char *native_eol,
                             svn_boolean_t *timestamp_sleep,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool)
@@ -1292,6 +1303,7 @@ svn_client__fetch_externals(apr_hash_t *
   cb.to_abspath        = to_abspath;
   cb.repos_root_url    = repos_root_url;
   cb.timestamp_sleep   = timestamp_sleep;
+  cb.native_eol        = native_eol;
   cb.is_export         = is_export;
   cb.pool              = pool;
 

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_client/merge.c?rev=980551&r1=980550&r2=980551&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_client/merge.c Thu Jul 29 19:38:44 2010
@@ -8973,8 +8973,9 @@ svn_client_merge3(const char *source1,
   baton.ctx = ctx;
 
   if (!dry_run)
-    SVN_ERR(svn_wc__call_with_write_lock(merge_cb, &baton, ctx->wc_ctx,
-                                         lock_abspath, pool, pool));
+    SVN_ERR(svn_wc__call_with_write_lock(merge_cb, &baton,
+                                         ctx->wc_ctx, lock_abspath, FALSE,
+                                         pool, pool));
   else
     SVN_ERR(merge_cb(&baton, pool, pool));
 
@@ -10157,7 +10158,7 @@ svn_client_merge_reintegrate(const char 
 
   if (!dry_run)
     SVN_ERR(svn_wc__call_with_write_lock(merge_reintegrate_cb, &baton,
-                                         ctx->wc_ctx, lock_abspath,
+                                         ctx->wc_ctx, lock_abspath, FALSE,
                                          pool, pool));
   else
     SVN_ERR(merge_reintegrate_cb(&baton, pool, pool));
@@ -10317,8 +10318,9 @@ svn_client_merge_peg3(const char *source
   baton.ctx = ctx;
 
   if (!dry_run)
-    SVN_ERR(svn_wc__call_with_write_lock(merge_peg_cb, &baton, ctx->wc_ctx,
-                                         lock_abspath, pool, pool));
+    SVN_ERR(svn_wc__call_with_write_lock(merge_peg_cb, &baton,
+                                         ctx->wc_ctx, lock_abspath, FALSE,
+                                         pool, pool));
   else
     SVN_ERR(merge_peg_cb(&baton, pool, pool));
 



Mime
View raw message