subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1853378 - in /subversion/trunk/subversion: include/private/svn_client_private.h libsvn_client/commit.c libsvn_client/wc_editor.c svn/shelf-cmd.c
Date Mon, 11 Feb 2019 14:17:55 GMT
Author: julianfoad
Date: Mon Feb 11 14:17:55 2019
New Revision: 1853378

URL: http://svn.apache.org/viewvc?rev=1853378&view=rev
Log:
Let the WC mods editor and WC replay editor APIs take explicit notification
callbacks.

* subversion/include/private/svn_client_private.h
  (svn_client__wc_replay,
   svn_client__wc_copy_mods): Take a notification callback.

* subversion/libsvn_client/commit.c
  (svn_client__wc_replay): Take a notification callback.

* subversion/libsvn_client/wc_editor.c
  (svn_client__wc_copy_mods): Take a notification callback.

* subversion/svn/shelf-cmd.c
  (svn_cl__wc_copy_mods): Adjust caller.


Modified:
    subversion/trunk/subversion/include/private/svn_client_private.h
    subversion/trunk/subversion/libsvn_client/commit.c
    subversion/trunk/subversion/libsvn_client/wc_editor.c
    subversion/trunk/subversion/svn/shelf-cmd.c

Modified: subversion/trunk/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_client_private.h?rev=1853378&r1=1853377&r2=1853378&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_client_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_client_private.h Mon Feb 11 14:17:55 2019
@@ -443,6 +443,7 @@ svn_client__repos_to_wc_copy_by_editor(s
  * editor methods shall be URLs.
  *
  * Send notifications via @a notify_func / @a notify_baton.
+ * ### INCOMPLETE
  *
  * RA_SESSION is used to fetch the original content for copies.
  *
@@ -527,6 +528,8 @@ svn_client__wc_replay(const char *src_wc
                       const apr_array_header_t *changelists,
                       const svn_delta_editor_t *editor,
                       void *edit_baton,
+                      svn_wc_notify_func2_t notify_func,
+                      void *notify_baton,
                       svn_client_ctx_t *ctx,
                       apr_pool_t *scratch_pool);
 
@@ -543,6 +546,8 @@ svn_client__wc_replay(const char *src_wc
 svn_error_t *
 svn_client__wc_copy_mods(const char *src_wc_abspath,
                          const char *dst_wc_abspath,
+                         svn_wc_notify_func2_t notify_func,
+                         void *notify_baton,
                          svn_client_ctx_t *ctx,
                          apr_pool_t *scratch_pool);
 

Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1853378&r1=1853377&r2=1853378&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Mon Feb 11 14:17:55 2019
@@ -559,6 +559,8 @@ svn_client__wc_replay(const char *src_wc
                       const apr_array_header_t *changelists,
                       const svn_delta_editor_t *editor,
                       void *edit_baton,
+                      svn_wc_notify_func2_t notify_func,
+                      void *notify_baton,
                       svn_client_ctx_t *ctx,
                       apr_pool_t *pool)
 {
@@ -569,6 +571,7 @@ svn_client__wc_replay(const char *src_wc
   svn_client__pathrev_t *base;
   const char *base_url;
   svn_wc_notify_func2_t saved_notify_func;
+  void *saved_notify_baton;
 
   /* Condense the target list. This makes all targets absolute. */
   SVN_ERR(svn_dirent_condense_targets(&base_abspath, &rel_targets, targets,
@@ -607,13 +610,16 @@ svn_client__wc_replay(const char *src_wc
   SVN_ERR(svn_client__condense_commit_items2(base_url, commit_items, pool));
 
   saved_notify_func = ctx->notify_func2;
-  ctx->notify_func2 = NULL;
+  saved_notify_baton = ctx->notify_baton2;
+  ctx->notify_func2 = notify_func;
+  ctx->notify_baton2 = notify_baton;
   /* BASE_URL is only used here in notifications & errors */
   SVN_ERR(svn_client__do_commit(base_url, commit_items,
                                 editor, edit_baton,
                                 NULL /*notify_prefix*/, NULL /*sha1_checksums*/,
                                 ctx, pool, pool));
   ctx->notify_func2 = saved_notify_func;
+  ctx->notify_baton2 = saved_notify_baton;
   return SVN_NO_ERROR;
 }
 

Modified: subversion/trunk/subversion/libsvn_client/wc_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/wc_editor.c?rev=1853378&r1=1853377&r2=1853378&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/wc_editor.c (original)
+++ subversion/trunk/subversion/libsvn_client/wc_editor.c Mon Feb 11 14:17:55 2019
@@ -618,6 +618,8 @@ svn_client__wc_editor(const svn_delta_ed
 svn_error_t *
 svn_client__wc_copy_mods(const char *src_wc_abspath,
                          const char *dst_wc_abspath,
+                         svn_wc_notify_func2_t notify_func,
+                         void *notify_baton,
                          svn_client_ctx_t *ctx,
                          apr_pool_t *scratch_pool)
 {
@@ -639,13 +641,15 @@ svn_client__wc_copy_mods(const char *src
                                       ctx, scratch_pool, scratch_pool));
   SVN_ERR(svn_client__wc_editor(&editor, &edit_baton,
                                 dst_wc_abspath,
-                                NULL, NULL,
+                                NULL, NULL, /*notification*/
                                 ra_session, ctx, scratch_pool));
 
   APR_ARRAY_PUSH(src_targets, const char *) = src_wc_abspath;
   SVN_ERR(svn_client__wc_replay(src_wc_abspath,
                                 src_targets, svn_depth_infinity, NULL,
-                                editor, edit_baton, ctx, scratch_pool));
+                                editor, edit_baton,
+                                notify_func, notify_baton,
+                                ctx, scratch_pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/svn/shelf-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/shelf-cmd.c?rev=1853378&r1=1853377&r2=1853378&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/shelf-cmd.c (original)
+++ subversion/trunk/subversion/svn/shelf-cmd.c Mon Feb 11 14:17:55 2019
@@ -1226,6 +1226,7 @@ svn_cl__wc_copy_mods(apr_getopt_t *os,
   SVN_ERR(svn_dirent_get_absolute(&dst_wc_abspath, dst_wc_abspath, pool));
 
   SVN_ERR(svn_client__wc_copy_mods(src_wc_abspath, dst_wc_abspath,
+                                   ctx->notify_func2, ctx->notify_baton2,
                                    ctx, pool));
 
   return SVN_NO_ERROR;



Mime
View raw message