You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2011/05/05 08:29:30 UTC

svn commit: r1099699 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/add.c libsvn_client/mergeinfo.c libsvn_client/patch.c libsvn_client/prop_commands.c libsvn_client/ra.c libsvn_wc/deprecated.c libsvn_wc/props.c

Author: gstein
Date: Thu May  5 06:29:29 2011
New Revision: 1099699

URL: http://svn.apache.org/viewvc?rev=1099699&view=rev
Log:
Add cancellation to svn_wc_prop_set4() since it (now) supports a depth and
walking a tree of nodes.

* subversion/include/svn_wc.h:
  (svn_wc_prop_set4): add CANCEL_FUNC/BATON parameters
  (svn_wc_prop_set3): update docstring

* subversion/libsvn_wc/deprecated.c:
  (svn_wc_prop_set3): adjust call to prop_set4

* subversion/libsvn_wc/props.c:
  (svn_wc_prop_set4): pass CANCEL_FUNC/BATON to the node walker

* subversion/libsvn_client/patch.c:
  (install_patched_prop_targets): adjust calls to prop_set4.

* subversion/libsvn_client/prop_commands.c:
  (struct set_props_baton): rename field to CHANGELIST_FILTER
  (set_props_cb): track field rename, pass CANCEL_FUNC/BATON
  (svn_client_propset_local): track field rename

* subversion/libsvn_client/ra.c:
  (set_wc_prop): add CANCEL_FUNC/BATON params to prop_set4 call

* subversion/libsvn_client/mergeinfo.c:
  (svn_client__record_wc_mergeinfo, elide_mergeinfo): adjust calls to
    prop_set4.

* subversion/libsvn_client/add.c:
  (add_file): adjust calls to prop_set4.

Modified:
    subversion/trunk/subversion/include/svn_wc.h
    subversion/trunk/subversion/libsvn_client/add.c
    subversion/trunk/subversion/libsvn_client/mergeinfo.c
    subversion/trunk/subversion/libsvn_client/patch.c
    subversion/trunk/subversion/libsvn_client/prop_commands.c
    subversion/trunk/subversion/libsvn_client/ra.c
    subversion/trunk/subversion/libsvn_wc/deprecated.c
    subversion/trunk/subversion/libsvn_wc/props.c

Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1099699&r1=1099698&r2=1099699&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Thu May  5 06:29:29 2011
@@ -5817,6 +5817,10 @@ svn_wc_prop_get(const svn_string_t **val
  * of one of those changelists.  If @a changelist_filter is empty (or
  * altogether @c NULL), no changelist filtering occurs.
  *
+ * If @a cancel_func is non-NULL, then it will be invoked (with the
+ * @a cancel_baton value passed) during the processing of the property
+ * set (i.e. when @a depth indicates some amount of recursion).
+ *
  * For each file or directory operated on, @a notify_func will be called
  * with its path and the @a notify_baton.  @a notify_func may be @c NULL
  * if you are not interested in this information.
@@ -5833,12 +5837,15 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
                  svn_depth_t depth,
                  svn_boolean_t skip_checks,
                  const apr_array_header_t *changelist_filter,
+                 svn_cancel_func_t cancel_func,
+                 void *cancel_baton,
                  svn_wc_notify_func2_t notify_func,
                  void *notify_baton,
                  apr_pool_t *scratch_pool);
 
 /** Similar to svn_wc_prop_set4(), but with a #svn_wc_adm_access_t /
- * relative path parameter pair.
+ * relative path parameter pair, no @a depth parameter, no changelist
+ * filtering (for the depth-based property setting), and no cancelation.
  *
  * @since New in 1.6.
  * @deprecated Provided for backwards 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=1099699&r1=1099698&r2=1099699&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/add.c (original)
+++ subversion/trunk/subversion/libsvn_client/add.c Thu May  5 06:29:29 2011
@@ -307,7 +307,10 @@ add_file(const char *local_abspath,
     /* This must be a special file. */
     SVN_ERR(svn_wc_prop_set4(ctx->wc_ctx, local_abspath, SVN_PROP_SPECIAL,
                              svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool),
-                             svn_depth_empty, FALSE, NULL, NULL, NULL, pool));
+                             svn_depth_empty, FALSE, NULL,
+                             NULL, NULL /* cancellation */,
+                             NULL, NULL /* notification */,
+                             pool));
   else if (properties)
     {
       /* loop through the hashtable and add the properties */
@@ -322,7 +325,9 @@ add_file(const char *local_abspath,
              the autoprops say to set some weird combination,
              we just error and let the user sort it out. */
           err = svn_wc_prop_set4(ctx->wc_ctx, local_abspath, pname, pval,
-                                 svn_depth_empty, FALSE, NULL, NULL, NULL,
+                                 svn_depth_empty, FALSE, NULL,
+                                 NULL, NULL /* cancellation */,
+                                 NULL, NULL /* notification */,
                                  pool);
           if (err)
             {

Modified: subversion/trunk/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mergeinfo.c?rev=1099699&r1=1099698&r2=1099699&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_client/mergeinfo.c Thu May  5 06:29:29 2011
@@ -114,7 +114,9 @@ svn_client__record_wc_mergeinfo(const ch
      ### svn_client__get_prop_from_wc(). */
   SVN_ERR(svn_wc_prop_set4(ctx->wc_ctx, local_abspath, SVN_PROP_MERGEINFO,
                            mergeinfo_str, svn_depth_empty,
-                           TRUE /* skip checks */, NULL, NULL, NULL,
+                           TRUE /* skip checks */, NULL,
+                           NULL, NULL /* cancellation */,
+                           NULL, NULL /* notification */,
                            scratch_pool));
 
   if (do_notification && ctx->notify_func2)
@@ -801,7 +803,9 @@ elide_mergeinfo(svn_mergeinfo_t parent_m
   if (elides)
     {
       SVN_ERR(svn_wc_prop_set4(ctx->wc_ctx, local_abspath, SVN_PROP_MERGEINFO,
-                               NULL, svn_depth_empty, TRUE, NULL, NULL, NULL,
+                               NULL, svn_depth_empty, TRUE, NULL,
+                               NULL, NULL /* cancellation */,
+                               NULL, NULL /* notification */,
                                scratch_pool));
 
       if (ctx->notify_func2)

Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=1099699&r1=1099698&r2=1099699&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Thu May  5 06:29:29 2011
@@ -2223,8 +2223,9 @@ install_patched_prop_targets(patch_targe
             SVN_ERR(svn_wc_prop_set4(ctx->wc_ctx, target->local_abspath,
                                      prop_target->name, NULL, svn_depth_empty,
                                      TRUE /* skip_checks */,
-                                     NULL, /* no changelist filtering */
-                                     NULL, NULL, /* suppress notification */
+                                     NULL /* changelist_filter */,
+                                     NULL, NULL /* cancellation */,
+                                     NULL, NULL /* notification */,
                                      iterpool));
           continue;
         }
@@ -2299,8 +2300,10 @@ install_patched_prop_targets(patch_targe
         {
           err = (svn_wc_prop_set4(ctx->wc_ctx, target->local_abspath,
                                   prop_target->name, prop_val, svn_depth_empty,
-                                  TRUE, /* ### Skipping checks */
-                                  NULL, NULL, NULL,
+                                  TRUE /* skip_checks */,
+                                  NULL /* changelist_filter */,
+                                  NULL, NULL /* cancellation */,
+                                  NULL, NULL /* notification */,
                                   iterpool));
         }
 

Modified: subversion/trunk/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/prop_commands.c?rev=1099699&r1=1099698&r2=1099699&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/prop_commands.c Thu May  5 06:29:29 2011
@@ -258,7 +258,7 @@ struct set_props_baton
   const char *propname;
   const svn_string_t *propval;
   svn_boolean_t skip_checks;
-  const apr_array_header_t *changelists;
+  const apr_array_header_t *changelist_filter;
 };
 
 /* Working copy lock callback for svn_client_propset4 */
@@ -271,8 +271,10 @@ set_props_cb(void *baton,
 
   SVN_ERR(svn_wc_prop_set4(bt->ctx->wc_ctx, bt->local_abspath, bt->propname,
                            bt->propval, bt->depth, bt->skip_checks,
-                           bt->changelists, bt->ctx->notify_func2,
-                           bt->ctx->notify_baton2, scratch_pool));
+                           bt->changelist_filter,
+                           bt->ctx->cancel_func, bt->ctx->cancel_baton,
+                           bt->ctx->notify_func2, bt->ctx->notify_baton2,
+                           scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -379,7 +381,7 @@ svn_client_propset_local(const char *pro
       baton.propname = propname;
       baton.propval = propval;
       baton.skip_checks = skip_checks;
-      baton.changelists = changelists;
+      baton.changelist_filter = changelists;
 
       SVN_ERR(svn_wc__call_with_write_lock(set_props_cb, &baton,
                                            ctx->wc_ctx, target_abspath,

Modified: subversion/trunk/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/ra.c?rev=1099699&r1=1099698&r2=1099699&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/ra.c (original)
+++ subversion/trunk/subversion/libsvn_client/ra.c Thu May  5 06:29:29 2011
@@ -193,9 +193,14 @@ set_wc_prop(void *baton,
      right, but the conflict would remind the user to make sure.
      Unfortunately, we don't have a clean mechanism for doing that
      here, so we just set the property and hope for the best. */
-  return svn_error_return(svn_wc_prop_set4(cb->ctx->wc_ctx, local_abspath, name,
-                                           value, svn_depth_empty, TRUE, NULL,
-                                           NULL, NULL, pool));
+  return svn_error_return(svn_wc_prop_set4(cb->ctx->wc_ctx, local_abspath,
+                                           name,
+                                           value, svn_depth_empty,
+                                           TRUE /* skip_checks */,
+                                           NULL /* changelist_filter */,
+                                           NULL, NULL /* cancellation */,
+                                           NULL, NULL /* notification */,
+                                           pool));
 }
 
 

Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1099699&r1=1099698&r2=1099699&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Thu May  5 06:29:29 2011
@@ -2234,10 +2234,16 @@ svn_wc_prop_set3(const char *name,
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
   SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL /* config */,
-                                         svn_wc__adm_get_db(adm_access), pool));
+                                         svn_wc__adm_get_db(adm_access),
+                                         pool));
 
-  err = svn_wc_prop_set4(wc_ctx, local_abspath, name, value, svn_depth_empty,
-                         skip_checks, NULL, notify_func, notify_baton, pool);
+  err = svn_wc_prop_set4(wc_ctx, local_abspath,
+                         name, value,
+                         svn_depth_empty,
+                         skip_checks, NULL /* changelist_filter */,
+                         NULL, NULL /* cancellation */,
+                         notify_func, notify_baton,
+                         pool);
 
   if (err && err->apr_err == SVN_ERR_WC_INVALID_SCHEDULE)
     svn_error_clear(err);

Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1099699&r1=1099698&r2=1099699&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Thu May  5 06:29:29 2011
@@ -2217,6 +2217,8 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
                  svn_depth_t depth,
                  svn_boolean_t skip_checks,
                  const apr_array_header_t *changelist_filter,
+                 svn_cancel_func_t cancel_func,
+                 void *cancel_baton,
                  svn_wc_notify_func2_t notify_func,
                  void *notify_baton,
                  apr_pool_t *scratch_pool)
@@ -2281,7 +2283,7 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
                                              FALSE, changelist_filter,
                                              propset_walk_cb, &wb,
                                              depth,
-                                             NULL, NULL,  /* cancellation */
+                                             cancel_func, cancel_baton,
                                              scratch_pool));
     }