You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/08/24 19:13:26 UTC

svn commit: r988627 - in /subversion/trunk/subversion: bindings/javahl/native/ include/ libsvn_client/ svn/

Author: hwright
Date: Tue Aug 24 17:13:25 2010
New Revision: 988627

URL: http://svn.apache.org/viewvc?rev=988627&view=rev
Log:
Move the commit callback out of the client context and into the individual APIs
which require it.

* subversion/bindings/javahl/native/SVNClient.cpp
  (remove, commit, copy, move, mkdir, doImport, propertySet): Set the callback
    as a param, rather than in the client context.
 
* subversion/svn/propdel-cmd.c,
  subversion/svn/move-cmd.c,
  subversion/svn/mkdir-cmd.c,
  subversion/svn/copy-cmd.c,
  subversion/svn/commit-cmd.c,
  subversion/svn/propset-cmd.c,
  subversion/svn/delete-cmd.c,
  subversion/svn/import-cmd.c,
  subversion/svn/propedit-cmd.c:
    Update API consumers to provide the commit callback.

* subversion/svn/main.c
  (main): Don't set the commit callback context members.

* subversion/include/svn_client.h
  (svn_client_ctx_t): Remove the commit callback and baton members.
  (svn_client_mkdir4, svn_client_delete4, svn_client_import4,
   svn_client_commit5, svn_client_copy6, svn_client_move6, svn_client_propset4):
    Add commit callback parameters.

* subversion/libsvn_client/deprecated.c
  (capture_baton_t): Remove unneded members.
  (capture_commit_info): Just dup the commit info and exit.
  (svn_client_mkdir3, svn_client_import3, svn_client_delete3,
   svn_client_commit4, svn_client_copy5, svn_client_move5, svn_client_propset3):
    Remove the use of the shadow baton.

* subversion/libsvn_client/delete.c,
  subversion/libsvn_client/prop_commands.c,
  subversion/libsvn_client/copy.c,
  subversion/libsvn_client/add.c,
  subversion/libsvn_client/commit.c:
    Explicitly pass around the commit callback and baton, rather than relying
    on the client context.

Modified:
    subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/libsvn_client/add.c
    subversion/trunk/subversion/libsvn_client/commit.c
    subversion/trunk/subversion/libsvn_client/copy.c
    subversion/trunk/subversion/libsvn_client/delete.c
    subversion/trunk/subversion/libsvn_client/deprecated.c
    subversion/trunk/subversion/libsvn_client/prop_commands.c
    subversion/trunk/subversion/svn/commit-cmd.c
    subversion/trunk/subversion/svn/copy-cmd.c
    subversion/trunk/subversion/svn/delete-cmd.c
    subversion/trunk/subversion/svn/import-cmd.c
    subversion/trunk/subversion/svn/main.c
    subversion/trunk/subversion/svn/mkdir-cmd.c
    subversion/trunk/subversion/svn/move-cmd.c
    subversion/trunk/subversion/svn/propdel-cmd.c
    subversion/trunk/subversion/svn/propedit-cmd.c
    subversion/trunk/subversion/svn/propset-cmd.c

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Tue Aug 24 17:13:25 2010
@@ -325,12 +325,10 @@ void SVNClient::remove(Targets &targets,
     const apr_array_header_t *targets2 = targets.array(requestPool);
     SVN_JNI_ERR(targets.error_occured(), );
 
-    ctx->commit_callback2 = CommitCallback::callback;
-    ctx->commit_baton = callback;
-
     SVN_JNI_ERR(svn_client_delete4(targets2, force, keep_local,
-                                   revprops.hash(requestPool), ctx,
-                                   requestPool.pool()), );
+                                   revprops.hash(requestPool),
+                                   CommitCallback::callback, callback,
+                                   ctx, requestPool.pool()), );
 }
 
 void SVNClient::revert(const char *path, svn_depth_t depth,
@@ -423,14 +421,12 @@ void SVNClient::commit(Targets &targets,
     if (ctx == NULL)
         return;
 
-    ctx->commit_callback2 = CommitCallback::callback;
-    ctx->commit_baton = callback;
-
     SVN_JNI_ERR(svn_client_commit5(targets2, depth,
                                    noUnlock, keepChangelist,
                                    changelists.array(requestPool),
-                                   revprops.hash(requestPool), ctx,
-                                   requestPool.pool()),
+                                   revprops.hash(requestPool),
+                                   CommitCallback::callback, callback,
+                                   ctx, requestPool.pool()),
                 );
 }
 
@@ -456,13 +452,11 @@ void SVNClient::copy(CopySources &copySo
     if (ctx == NULL)
         return;
 
-    ctx->commit_callback2 = CommitCallback::callback;
-    ctx->commit_baton = callback;
-
     SVN_JNI_ERR(svn_client_copy6(srcs, destinationPath.c_str(),
                                  copyAsChild, makeParents, ignoreExternals,
-                                 revprops.hash(requestPool), ctx,
-                                 requestPool.pool()), );
+                                 revprops.hash(requestPool),
+                                 CommitCallback::callback, callback,
+                                 ctx, requestPool.pool()), );
 }
 
 void SVNClient::move(Targets &srcPaths, const char *destPath,
@@ -482,12 +476,10 @@ void SVNClient::move(Targets &srcPaths, 
     if (ctx == NULL)
         return;
 
-    ctx->commit_callback2 = CommitCallback::callback;
-    ctx->commit_baton = callback;
-
     SVN_JNI_ERR(svn_client_move6((apr_array_header_t *) srcs,
                                  destinationPath.c_str(), force, moveAsChild,
-                                 makeParents, revprops.hash(requestPool), ctx,
+                                 makeParents, revprops.hash(requestPool),
+                                 CommitCallback::callback, callback, ctx,
                                  requestPool.pool()), );
 }
 
@@ -499,15 +491,13 @@ void SVNClient::mkdir(Targets &targets, 
     if (ctx == NULL)
         return;
 
-    ctx->commit_callback2 = CommitCallback::callback;
-    ctx->commit_baton = callback;
-
     const apr_array_header_t *targets2 = targets.array(requestPool);
     SVN_JNI_ERR(targets.error_occured(), );
 
     SVN_JNI_ERR(svn_client_mkdir4(targets2, makeParents,
-                                  revprops.hash(requestPool), ctx,
-                                  requestPool.pool()), );
+                                  revprops.hash(requestPool),
+                                  CommitCallback::callback, callback,
+                                  ctx, requestPool.pool()), );
 }
 
 void SVNClient::cleanup(const char *path)
@@ -621,13 +611,11 @@ void SVNClient::doImport(const char *pat
     if (ctx == NULL)
         return;
 
-    ctx->commit_callback2 = CommitCallback::callback;
-    ctx->commit_baton = callback;
-
     SVN_JNI_ERR(svn_client_import4(intPath.c_str(), intUrl.c_str(), depth,
                                    noIgnore, ignoreUnknownNodeTypes,
-                                   revprops.hash(requestPool), ctx,
-                                   requestPool.pool()), );
+                                   revprops.hash(requestPool),
+                                   CommitCallback::callback, callback, 
+                                   ctx, requestPool.pool()), );
 }
 
 jobject
@@ -951,13 +939,11 @@ void SVNClient::propertySet(const char *
     if (ctx == NULL)
         return;
 
-    ctx->commit_callback2 = CommitCallback::callback;
-    ctx->commit_baton = callback;
-
     SVN_JNI_ERR(svn_client_propset4(name, val, intPath.c_str(),
                                     depth, force, SVN_INVALID_REVNUM,
                                     changelists.array(requestPool),
                                     revprops.hash(requestPool),
+                                    CommitCallback::callback, callback,
                                     ctx, requestPool.pool()), );
 }
 

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Tue Aug 24 17:13:25 2010
@@ -948,17 +948,6 @@ typedef struct svn_client_ctx_t
    * @since New in 1.7.  */
   svn_wc_context_t *wc_ctx;
 
-  /** A commit callback to call when a commit succeeds.
-   * @note There is no @a commit_callback member; this is named
-   * @a commit_callback2 to reflect its type.
-   * 
-   * @since New in 1.7.
-   */
-  svn_commit_callback2_t commit_callback2;
-
-  /** Callback baton for #commit_callback2. */
-  void *commit_baton;
-
 } svn_client_ctx_t;
 
 /** Initialize a client context.
@@ -1486,9 +1475,9 @@ svn_client_add(const char *path,
  * @a ctx->notify_baton2 and the path of the new directory.  Note that this is
  * only called for items added to the working copy.
  *
- * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
- * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
- * #svn_commit_info_t for the commit.
+ * If @a commit_callback is non-NULL, then for each successful commit, call
+ * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
+ * the commit.
  *
  * @since New in 1.7.
  */
@@ -1496,12 +1485,14 @@ svn_error_t *
 svn_client_mkdir4(const apr_array_header_t *paths,
                   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);
 
 /**
  * Similar to svn_client_mkdir4(), but returns the @a commit_info_p directly,
- * rather than through @a ctx->commit_callback2.
+ * rather than through @a commit_callback.
  *
  * @since New in 1.5.
  * @deprecated Provided for backward compatibility with the 1.4 API.
@@ -1589,9 +1580,9 @@ svn_client_mkdir(svn_client_commit_info_
  * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted
  * item.
  *
- * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
- * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
- * #svn_commit_info_t for the commit.
+ * If @a commit_callback is non-NULL, then for each successful commit, call
+ * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
+ * the commit.
  *
  * @since New in 1.7.
  */
@@ -1600,12 +1591,14 @@ svn_client_delete4(const apr_array_heade
                    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);
 
 /**
  * Similar to svn_client_delete4(), but returns the @a commit_info_p directly,
- * rather than through @a ctx->commit_callback2.
+ * rather than through @a commit_callback.
  *
  * @since New in 1.5.
  * @deprecated Provided for backward compatibility with the 1.6 API.
@@ -1712,9 +1705,9 @@ svn_client_delete(svn_client_commit_info
  * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
  * node type is unknown, such as device files and pipes.
  *
- * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
- * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
- * #svn_commit_info_t for the commit.
+ * If @a commit_callback is non-NULL, then for each successful commit, call
+ * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
+ * the commit.
  *
  * @since New in 1.7.
  */
@@ -1725,12 +1718,14 @@ svn_client_import4(const char *path,
                    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);
 
 /**
  * Similar to svn_client_import4(), but returns the @a commit_info_p directly,
- * rather than through @a ctx->commit_callback2.
+ * rather than through @a commit_callback.
  *
  * @since New in 1.5.
  * @deprecated Provided for backward compatibility with the 1.6 API.
@@ -1836,9 +1831,9 @@ svn_client_import(svn_client_commit_info
  *
  * Use @a pool for any temporary allocations.
  *
- * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
- * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
- * #svn_commit_info_t for the commit.
+ * If @a commit_callback is non-NULL, then for each successful commit, call
+ * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
+ * the commit.
  *
  * @since New in 1.7.
  */
@@ -1849,12 +1844,14 @@ svn_client_commit5(const apr_array_heade
                    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);
 
 /**
  * Similar to svn_client_commit5(), but returns the @a commit_info_p directly,
- * rather than through @a ctx->commit_callback2.
+ * rather than through @a commit_callback.
  *
  * Also, if no error is returned and @a (*commit_info_p)->revision is set to
  * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to
@@ -3644,9 +3641,9 @@ typedef struct svn_client_copy_source_t
  * for each item added at the new location, passing the new, relative path of
  * the added item.
  *
- * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
- * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
- * #svn_commit_info_t for the commit.
+ * If @a commit_callback is non-NULL, then for each successful commit, call
+ * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
+ * the commit.
  *
  * @since New in 1.7.
  */
@@ -3657,12 +3654,14 @@ svn_client_copy6(const apr_array_header_
                  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);
 
 /**
  * Similar to svn_client_copy6(), but returns the @a commit_info_p directly,
- * rather than through @a ctx->commit_callback2.
+ * rather than through @a commit_callback.
  *
  * @since New in 1.6.
  * @deprecated Provided for backward compatibility with the 1.6 API.
@@ -3831,9 +3830,9 @@ svn_client_copy(svn_client_commit_info_t
  *
  * ### Is this really true?  What about svn_wc_notify_commit_replaced()? ###
  *
- * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
- * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
- * #svn_commit_info_t for the commit.
+ * If @a commit_callback is non-NULL, then for each successful commit, call
+ * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
+ * the commit.
  *
  * @since New in 1.7.
  */
@@ -3844,12 +3843,14 @@ svn_client_move6(const apr_array_header_
                  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);
 
 /**
  * Similar to svn_client_move6(), but returns the @a commit_info_p directly,
- * rather than through @a ctx->commit_callback2.
+ * rather than through @a commit_callback.
  *
  * @since New in 1.5.
  * @deprecated Provided for backward compatibility with the 1.6 API.
@@ -4001,9 +4002,9 @@ svn_client_move(svn_client_commit_info_t
  * If @a ctx->cancel_func is non-NULL, invoke it passing @a
  * ctx->cancel_baton at various places during the operation.
  *
- * If @a ctx->commit_callback2 is non-NULL, then for each successful commit,
- * call @a ctx->commit_callback2 with @a ctx->commit_baton and a
- * #svn_commit_info_t for the commit.
+ * If @a commit_callback is non-NULL, then for each successful commit, call
+ * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
+ * the commit.
  *
  * Use @a pool for all memory allocation.
  *
@@ -4018,12 +4019,14 @@ svn_client_propset4(const char *propname
                     svn_revnum_t base_revision_for_url,
                     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);
 
 /**
  * Similar to svn_client_propset4(), but returns the @a commit_info_p directly,
- * rather than through @a ctx->commit_callback2.
+ * rather than through @a commit_callback.
  *
  * @since New in 1.5.
  * @deprecated Provided for backward compatibility with the 1.6 API.

Modified: subversion/trunk/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/add.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/add.c (original)
+++ subversion/trunk/subversion/libsvn_client/add.c Tue Aug 24 17:13:25 2010
@@ -656,6 +656,8 @@ static svn_error_t *
 mkdir_urls(const apr_array_header_t *urls,
            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)
 {
@@ -805,8 +807,8 @@ mkdir_urls(const apr_array_header_t *url
   /* Fetch RA commit editor */
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    ctx->commit_callback2,
-                                    ctx->commit_baton,
+                                    commit_callback,
+                                    commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
 
@@ -867,6 +869,8 @@ svn_error_t *
 svn_client_mkdir4(const apr_array_header_t *paths,
                   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)
 {
@@ -875,7 +879,8 @@ svn_client_mkdir4(const apr_array_header
 
   if (svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *)))
     {
-      SVN_ERR(mkdir_urls(paths, make_parents, revprop_table, ctx, pool));
+      SVN_ERR(mkdir_urls(paths, make_parents, revprop_table, commit_callback,
+                         commit_baton, ctx, pool));
     }
   else
     {

Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Tue Aug 24 17:13:25 2010
@@ -676,6 +676,8 @@ svn_client_import4(const char *path,
                    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)
 {
@@ -765,8 +767,7 @@ svn_client_import4(const char *path,
   while ((err = get_ra_editor(&ra_session,
                               &editor, &edit_baton, ctx, url, base_dir_abspath,
                               log_msg, NULL, revprop_table, FALSE, NULL, TRUE,
-                              ctx->commit_callback2, ctx->commit_baton,
-                              subpool)));
+                              commit_callback, commit_baton, subpool)));
 
   /* Reverse the order of the components we added to our NEW_ENTRIES array. */
   if (new_entries->nelts)
@@ -1036,6 +1037,8 @@ svn_client_commit5(const apr_array_heade
                    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)
 {
@@ -1197,8 +1200,8 @@ svn_client_commit5(const apr_array_heade
                                      pool)))
     goto cleanup;
 
-  cb.original_callback = ctx->commit_callback2;
-  cb.original_baton = ctx->commit_baton;
+  cb.original_callback = commit_callback;
+  cb.original_baton = commit_baton;
   cb.info = &commit_info;
   cb.pool = pool;
 

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Tue Aug 24 17:13:25 2010
@@ -724,6 +724,8 @@ static svn_error_t *
 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)
@@ -1116,8 +1118,8 @@ repos_to_repos_copy(const apr_array_head
   /* Fetch RA commit editor. */
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    ctx->commit_callback2,
-                                    ctx->commit_baton,
+                                    commit_callback,
+                                    commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
 
@@ -1152,6 +1154,8 @@ static svn_error_t *
 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)
 {
@@ -1390,8 +1394,8 @@ wc_to_repos_copy(const apr_array_header_
   /* Fetch RA commit editor. */
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    ctx->commit_callback2,
-                                    ctx->commit_baton, NULL,
+                                    commit_callback,
+                                    commit_baton, NULL,
                                     TRUE, /* No lock tokens */
                                     pool));
 
@@ -1872,6 +1876,8 @@ try_copy(const apr_array_header_t *sourc
          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)
 {
@@ -2156,7 +2162,8 @@ try_copy(const apr_array_header_t *sourc
   else if ((! srcs_are_urls) && (dst_is_url))
     {
       return svn_error_return(
-        wc_to_repos_copy(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))
     {
@@ -2167,8 +2174,9 @@ try_copy(const apr_array_header_t *sourc
   else
     {
       return svn_error_return(
-        repos_to_repos_copy(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));
     }
 }
 
@@ -2182,6 +2190,8 @@ svn_client_copy6(const apr_array_header_
                  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)
 {
@@ -2198,6 +2208,7 @@ svn_client_copy6(const apr_array_header_
                  make_parents,
                  ignore_externals,
                  revprop_table,
+                 commit_callback, commit_baton,
                  ctx,
                  subpool);
 
@@ -2230,6 +2241,7 @@ svn_client_copy6(const apr_array_header_
                      make_parents,
                      ignore_externals,
                      revprop_table,
+                     commit_callback, commit_baton,
                      ctx,
                      subpool);
     }
@@ -2246,6 +2258,8 @@ svn_client_move6(const apr_array_header_
                  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)
 {
@@ -2280,6 +2294,7 @@ svn_client_move6(const apr_array_header_
                  make_parents,
                  FALSE,
                  revprop_table,
+                 commit_callback, commit_baton,
                  ctx,
                  subpool);
 
@@ -2309,6 +2324,7 @@ svn_client_move6(const apr_array_header_
                      make_parents,
                      FALSE,
                      revprop_table,
+                     commit_callback, commit_baton,
                      ctx,
                      subpool);
     }

Modified: subversion/trunk/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/delete.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/delete.c (original)
+++ subversion/trunk/subversion/libsvn_client/delete.c Tue Aug 24 17:13:25 2010
@@ -138,6 +138,8 @@ path_driver_cb_func(void **dir_baton,
 static svn_error_t *
 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)
 {
@@ -237,8 +239,8 @@ delete_urls(const apr_array_header_t *pa
   /* Fetch RA commit editor */
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    ctx->commit_callback2,
-                                    ctx->commit_baton,
+                                    commit_callback,
+                                    commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
 
@@ -315,6 +317,8 @@ svn_client_delete4(const apr_array_heade
                    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)
 {
@@ -338,7 +342,8 @@ svn_client_delete4(const apr_array_heade
 
   if (is_url)
     {
-      SVN_ERR(delete_urls(paths, revprop_table, ctx, pool));
+      SVN_ERR(delete_urls(paths, revprop_table, commit_callback, commit_baton,
+                          ctx, pool));
     }
   else
     {

Modified: subversion/trunk/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/deprecated.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_client/deprecated.c Tue Aug 24 17:13:25 2010
@@ -53,13 +53,8 @@
 
 /* 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;
 };
 
 
@@ -74,11 +69,6 @@ capture_commit_info(const svn_commit_inf
 
   *(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;
 }
 
@@ -124,20 +114,13 @@ svn_client_mkdir3(svn_commit_info_t **co
                   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);
+  return svn_client_mkdir4(paths, make_parents, revprop_table,
+                           capture_commit_info, &cb, ctx, pool);
 }
 
 svn_error_t *
@@ -398,21 +381,14 @@ svn_client_import3(svn_commit_info_t **c
                    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);
+                            capture_commit_info, &cb, ctx, pool);
 }
 
 svn_error_t *
@@ -460,23 +436,17 @@ svn_client_commit4(svn_commit_info_t **c
                    svn_client_ctx_t *ctx,
                    apr_pool_t *pool)
 {
-  svn_client_ctx_t shadow_ctx;
   struct capture_baton_t cb;
 
+  *commit_info_p = NULL;
   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));
+                             changelists, revprop_table,
+                             capture_commit_info, &cb, ctx, pool));
 
-  if (!cb.saw_commit)
+  if (! *commit_info_p)
     *commit_info_p = svn_create_commit_info(pool);
 
   return SVN_NO_ERROR;
@@ -539,20 +509,14 @@ svn_client_copy5(svn_commit_info_t **com
                  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);
+                          ignore_externals, revprop_table,
+                          capture_commit_info, &cb, ctx, pool);
 }
 
 svn_error_t *
@@ -651,20 +615,14 @@ svn_client_move5(svn_commit_info_t **com
                  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);
+                          make_parents, revprop_table,
+                          capture_commit_info, &cb, ctx, pool);
 }
 
 svn_error_t *
@@ -768,20 +726,13 @@ svn_client_delete3(svn_commit_info_t **c
                    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);
+                            capture_commit_info, &cb, ctx, pool);
 }
 
 svn_error_t *
@@ -1487,21 +1438,14 @@ svn_client_propset3(svn_commit_info_t **
                     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);
+                             capture_commit_info, &cb, ctx, pool);
 }
 
 svn_error_t *

Modified: subversion/trunk/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/prop_commands.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/prop_commands.c Tue Aug 24 17:13:25 2010
@@ -196,6 +196,8 @@ propset_on_url(const char *propname,
                svn_boolean_t skip_checks,
                svn_revnum_t base_revision_for_url,
                const apr_hash_t *revprop_table,
+               svn_commit_callback2_t commit_callback,
+               void *commit_baton,
                svn_client_ctx_t *ctx,
                apr_pool_t *pool)
 {
@@ -270,8 +272,8 @@ propset_on_url(const char *propname,
   /* Fetch RA commit editor. */
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    ctx->commit_callback2,
-                                    ctx->commit_baton,
+                                    commit_callback,
+                                    commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
 
@@ -346,6 +348,8 @@ svn_client_propset4(const char *propname
                     svn_revnum_t base_revision_for_url,
                     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)
 {
@@ -397,7 +401,8 @@ svn_client_propset4(const char *propname
                                    "'%s' is not supported"), propname, target);
 
       return propset_on_url(propname, propval, target, skip_checks,
-                            base_revision_for_url, revprop_table, ctx, pool);
+                            base_revision_for_url, revprop_table,
+                            commit_callback, commit_baton, ctx, pool);
     }
   else
     {

Modified: subversion/trunk/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/commit-cmd.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/commit-cmd.c (original)
+++ subversion/trunk/subversion/svn/commit-cmd.c Tue Aug 24 17:13:25 2010
@@ -119,6 +119,9 @@ svn_cl__commit(apr_getopt_t *os,
                            opt_state->keep_changelists,
                            opt_state->changelists,
                            opt_state->revprop_table,
+                           ! opt_state->quiet
+                                ? svn_cl__print_commit_info : NULL,
+                           NULL,
                            ctx,
                            pool);
   if (err)

Modified: subversion/trunk/subversion/svn/copy-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/copy-cmd.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/copy-cmd.c (original)
+++ subversion/trunk/subversion/svn/copy-cmd.c Tue Aug 24 17:13:25 2010
@@ -139,7 +139,9 @@ svn_cl__copy(apr_getopt_t *os,
 
   err = svn_client_copy6(sources, dst_path, TRUE,
                          opt_state->parents, opt_state->ignore_externals,
-                         opt_state->revprop_table, ctx, pool);
+                         opt_state->revprop_table,
+                         svn_cl__print_commit_info, NULL,
+                         ctx, pool);
 
   if (ctx->log_msg_func3)
     SVN_ERR(svn_cl__cleanup_log_msg(ctx->log_msg_baton3, err, pool));

Modified: subversion/trunk/subversion/svn/delete-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/delete-cmd.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/delete-cmd.c (original)
+++ subversion/trunk/subversion/svn/delete-cmd.c Tue Aug 24 17:13:25 2010
@@ -89,7 +89,8 @@ svn_cl__delete(apr_getopt_t *os,
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   err = svn_client_delete4(targets, opt_state->force, opt_state->keep_local,
-                           opt_state->revprop_table, ctx, pool);
+                           opt_state->revprop_table, svn_cl__print_commit_info,
+                           NULL, ctx, pool);
   if (err)
     err = svn_cl__may_need_force(err);
 

Modified: subversion/trunk/subversion/svn/import-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/import-cmd.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/import-cmd.c (original)
+++ subversion/trunk/subversion/svn/import-cmd.c Tue Aug 24 17:13:25 2010
@@ -124,6 +124,8 @@ svn_cl__import(apr_getopt_t *os,
                               opt_state->no_ignore,
                               opt_state->force,
                               opt_state->revprop_table,
+                              svn_cl__print_commit_info,
+                              NULL,
                               ctx,
                               pool), pool));
 

Modified: subversion/trunk/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/main.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/main.c (original)
+++ subversion/trunk/subversion/svn/main.c Tue Aug 24 17:13:25 2010
@@ -2230,10 +2230,6 @@ main(int argc, const char *argv[])
         return svn_cmdline_handle_exit_error(err, pool, "svn: ");
     }
 
-  /* Set up our commit callback.  We leave the callback NULL. */
-  if (!opt_state.quiet)
-    ctx->commit_callback2 = svn_cl__print_commit_info;
-
   /* Set up our cancellation support. */
   ctx->cancel_func = svn_cl__check_cancel;
   apr_signal(SIGINT, signal_handler);

Modified: subversion/trunk/subversion/svn/mkdir-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/mkdir-cmd.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/mkdir-cmd.c (original)
+++ subversion/trunk/subversion/svn/mkdir-cmd.c Tue Aug 24 17:13:25 2010
@@ -76,7 +76,8 @@ svn_cl__mkdir(apr_getopt_t *os,
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
   err = svn_client_mkdir4(targets, opt_state->parents,
-                          opt_state->revprop_table, ctx, pool);
+                          opt_state->revprop_table, svn_cl__print_commit_info,
+                          NULL, ctx, pool);
 
   if (ctx->log_msg_func3)
     err = svn_cl__cleanup_log_msg(ctx->log_msg_baton3, err, pool);

Modified: subversion/trunk/subversion/svn/move-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/move-cmd.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/move-cmd.c (original)
+++ subversion/trunk/subversion/svn/move-cmd.c Tue Aug 24 17:13:25 2010
@@ -86,7 +86,7 @@ svn_cl__move(apr_getopt_t *os,
 
   err = svn_client_move6(targets, dst_path, opt_state->force,
                          TRUE, opt_state->parents, opt_state->revprop_table,
-                         ctx, pool);
+                         svn_cl__print_commit_info, NULL, ctx, pool);
 
   if (err)
     err = svn_cl__may_need_force(err);

Modified: subversion/trunk/subversion/svn/propdel-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/propdel-cmd.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/propdel-cmd.c (original)
+++ subversion/trunk/subversion/svn/propdel-cmd.c Tue Aug 24 17:13:25 2010
@@ -141,6 +141,7 @@ svn_cl__propdel(apr_getopt_t *os,
                                opt_state->depth,
                                FALSE, SVN_INVALID_REVNUM,
                                opt_state->changelists, NULL,
+                               svn_cl__print_commit_info, NULL,
                                ctx, subpool),
                               NULL, opt_state->quiet,
                               SVN_ERR_UNVERSIONED_RESOURCE,

Modified: subversion/trunk/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/propedit-cmd.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/propedit-cmd.c (original)
+++ subversion/trunk/subversion/svn/propedit-cmd.c Tue Aug 24 17:13:25 2010
@@ -283,9 +283,6 @@ svn_cl__propedit(apr_getopt_t *os,
             : svn_dirent_local_style(target, subpool);
           cib.target_local = target_local;
 
-          ctx->commit_callback2 = commit_info_handler;
-          ctx->commit_baton = &cib;
-
           /* ...and re-set the property's value accordingly. */
           if (edited_propval && !svn_string_compare(propval, edited_propval))
             {
@@ -302,6 +299,7 @@ svn_cl__propedit(apr_getopt_t *os,
               err = svn_client_propset4(pname_utf8, edited_propval, target,
                                         svn_depth_empty, opt_state->force,
                                         base_rev, NULL, opt_state->revprop_table,
+                                        commit_info_handler, &cib,
                                         ctx, subpool);
               if (ctx->log_msg_func3)
                 SVN_ERR(svn_cl__cleanup_log_msg(ctx->log_msg_baton3,

Modified: subversion/trunk/subversion/svn/propset-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/propset-cmd.c?rev=988627&r1=988626&r2=988627&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/propset-cmd.c (original)
+++ subversion/trunk/subversion/svn/propset-cmd.c Tue Aug 24 17:13:25 2010
@@ -182,7 +182,8 @@ svn_cl__propset(apr_getopt_t *os,
                                pname_utf8, propval, target,
                                opt_state->depth, opt_state->force,
                                SVN_INVALID_REVNUM, opt_state->changelists,
-                               NULL, ctx, iterpool),
+                               NULL, svn_cl__print_commit_info, NULL, ctx,
+                               iterpool),
                               NULL, opt_state->quiet,
                               SVN_ERR_UNVERSIONED_RESOURCE,
                               SVN_ERR_ENTRY_NOT_FOUND,



Re: svn commit: r988627 - in /subversion/trunk/subversion: bindings/javahl/native/ include/ libsvn_client/ svn/

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Thanks!

On Wed, Aug 25, 2010 at 6:55 AM, Julian Foad <ju...@wandisco.com> wrote:
> On Tue, 2010-08-24, hwright@apache.org wrote:
>> Log:
>> Move the commit callback out of the client context and into the individual APIs
>> which require it.
>
> Hurrah!
>
> Reviewed and looks good.
>
> - Julian
>
>
>> * subversion/bindings/javahl/native/SVNClient.cpp
>>   (remove, commit, copy, move, mkdir, doImport, propertySet): Set the callback
>>     as a param, rather than in the client context.
>>
>> * subversion/svn/propdel-cmd.c,
>>   subversion/svn/move-cmd.c,
>>   subversion/svn/mkdir-cmd.c,
>>   subversion/svn/copy-cmd.c,
>>   subversion/svn/commit-cmd.c,
>>   subversion/svn/propset-cmd.c,
>>   subversion/svn/delete-cmd.c,
>>   subversion/svn/import-cmd.c,
>>   subversion/svn/propedit-cmd.c:
>>     Update API consumers to provide the commit callback.
>>
>> * subversion/svn/main.c
>>   (main): Don't set the commit callback context members.
>>
>> * subversion/include/svn_client.h
>>   (svn_client_ctx_t): Remove the commit callback and baton members.
>>   (svn_client_mkdir4, svn_client_delete4, svn_client_import4,
>>    svn_client_commit5, svn_client_copy6, svn_client_move6, svn_client_propset4):
>>     Add commit callback parameters.
>>
>> * subversion/libsvn_client/deprecated.c
>>   (capture_baton_t): Remove unneded members.
>>   (capture_commit_info): Just dup the commit info and exit.
>>   (svn_client_mkdir3, svn_client_import3, svn_client_delete3,
>>    svn_client_commit4, svn_client_copy5, svn_client_move5, svn_client_propset3):
>>     Remove the use of the shadow baton.
>>
>> * subversion/libsvn_client/delete.c,
>>   subversion/libsvn_client/prop_commands.c,
>>   subversion/libsvn_client/copy.c,
>>   subversion/libsvn_client/add.c,
>>   subversion/libsvn_client/commit.c:
>>     Explicitly pass around the commit callback and baton, rather than relying
>>     on the client context.
> [...]
>
>

Re: svn commit: r988627 - in /subversion/trunk/subversion: bindings/javahl/native/ include/ libsvn_client/ svn/

Posted by Julian Foad <ju...@wandisco.com>.
On Tue, 2010-08-24, hwright@apache.org wrote:
> Log:
> Move the commit callback out of the client context and into the individual APIs
> which require it.

Hurrah!

Reviewed and looks good.

- Julian


> * subversion/bindings/javahl/native/SVNClient.cpp
>   (remove, commit, copy, move, mkdir, doImport, propertySet): Set the callback
>     as a param, rather than in the client context.
>  
> * subversion/svn/propdel-cmd.c,
>   subversion/svn/move-cmd.c,
>   subversion/svn/mkdir-cmd.c,
>   subversion/svn/copy-cmd.c,
>   subversion/svn/commit-cmd.c,
>   subversion/svn/propset-cmd.c,
>   subversion/svn/delete-cmd.c,
>   subversion/svn/import-cmd.c,
>   subversion/svn/propedit-cmd.c:
>     Update API consumers to provide the commit callback.
> 
> * subversion/svn/main.c
>   (main): Don't set the commit callback context members.
> 
> * subversion/include/svn_client.h
>   (svn_client_ctx_t): Remove the commit callback and baton members.
>   (svn_client_mkdir4, svn_client_delete4, svn_client_import4,
>    svn_client_commit5, svn_client_copy6, svn_client_move6, svn_client_propset4):
>     Add commit callback parameters.
> 
> * subversion/libsvn_client/deprecated.c
>   (capture_baton_t): Remove unneded members.
>   (capture_commit_info): Just dup the commit info and exit.
>   (svn_client_mkdir3, svn_client_import3, svn_client_delete3,
>    svn_client_commit4, svn_client_copy5, svn_client_move5, svn_client_propset3):
>     Remove the use of the shadow baton.
> 
> * subversion/libsvn_client/delete.c,
>   subversion/libsvn_client/prop_commands.c,
>   subversion/libsvn_client/copy.c,
>   subversion/libsvn_client/add.c,
>   subversion/libsvn_client/commit.c:
>     Explicitly pass around the commit callback and baton, rather than relying
>     on the client context.
[...]