Author: pburba
Date: Mon May  9 20:18:16 2011
New Revision: 1101205

URL: http://svn.apache.org/viewvc?rev=1101205&view=rev
Log:
Follow-up to r1101195, remove some unnecessary subpools from
svn_wc_diff_callbacks4_t callback helpers.

* subversion/libsvn_client/diff.c

  (diff_props_changed): Use the readily available scratch pool rather than
   creating a new subpool.

* subversion/libsvn_client/merge.c

  (merge_props_changed): Ditto.

Modified:
    subversion/trunk/subversion/libsvn_client/diff.c
    subversion/trunk/subversion/libsvn_client/merge.c

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1101205&r1=1101204&r2=1101205&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Mon May  9 20:18:16 2011
@@ -801,9 +801,9 @@ diff_props_changed(svn_wc_notify_state_t
   struct diff_cmd_baton *diff_cmd_baton = diff_baton;
   apr_array_header_t *props;
   svn_boolean_t show_diff_header;
-  apr_pool_t *subpool = svn_pool_create(diff_cmd_baton->pool);
 
-  SVN_ERR(svn_categorize_props(propchanges, NULL, NULL, &props, subpool));
+  SVN_ERR(svn_categorize_props(propchanges, NULL, NULL, &props,
+                               scratch_pool));
 
   if (apr_hash_get(diff_cmd_baton->visited_paths, path, APR_HASH_KEY_STRING))
     show_diff_header = FALSE;
@@ -828,7 +828,7 @@ diff_props_changed(svn_wc_notify_state_t
                                  diff_cmd_baton->ra_session,
                                  diff_cmd_baton->wc_ctx,
                                  diff_cmd_baton->wc_root_abspath,
-                                 subpool));
+                                 scratch_pool));
 
       /* We've printed the diff header so now we can mark the path as
        * visited. */
@@ -842,7 +842,6 @@ diff_props_changed(svn_wc_notify_state_t
   if (tree_conflicted)
     *tree_conflicted = FALSE;
 
-  svn_pool_destroy(subpool);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1101205&r1=1101204&r2=1101205&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Mon May  9 20:18:16 2011
@@ -1064,19 +1064,19 @@ merge_props_changed(svn_wc_notify_state_
   apr_array_header_t *props;
   merge_cmd_baton_t *merge_b = baton;
   svn_client_ctx_t *ctx = merge_b->ctx;
-  apr_pool_t *subpool = svn_pool_create(merge_b->pool);
   svn_error_t *err;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
-  SVN_ERR(svn_categorize_props(propchanges, NULL, NULL, &props, subpool));
+  SVN_ERR(svn_categorize_props(propchanges, NULL, NULL, &props,
+                               scratch_pool));
 
   /* If we are only applying mergeinfo changes then we need to do
      additional filtering of PROPS so it contains only mergeinfo changes. */
   if (merge_b->record_only && props->nelts)
     {
       apr_array_header_t *mergeinfo_props =
-        apr_array_make(subpool, 1, sizeof(svn_prop_t));
+        apr_array_make(scratch_pool, 1, sizeof(svn_prop_t));
       int i;
 
       for (i = 0; i < props->nelts; i++)
@@ -1110,13 +1110,13 @@ merge_props_changed(svn_wc_notify_state_
                                                   merge_b->reintegrate_merge,
                                                   merge_b->ra_session2,
                                                   merge_b->ctx,
-                                                  subpool));
+                                                  scratch_pool));
 
       err = svn_wc_merge_props3(state, ctx->wc_ctx, local_abspath, NULL, NULL,
                                 original_props, props, merge_b->dry_run,
                                 ctx->conflict_func2, ctx->conflict_baton2,
                                 ctx->cancel_func, ctx->cancel_baton,
-                                subpool);
+                                scratch_pool);
 
       /* If this is not a dry run then make a record in BATON if we find a
          PATH where mergeinfo is added where none existed previously or PATH
@@ -1176,14 +1176,12 @@ merge_props_changed(svn_wc_notify_state_
           if (tree_conflicted)
             *tree_conflicted = TRUE;
           svn_error_clear(err);
-          svn_pool_destroy(subpool);
           return SVN_NO_ERROR;
         }
       else if (err)
         return svn_error_return(err);
     }
 
-  svn_pool_destroy(subpool);
   return SVN_NO_ERROR;
 }
 


Reply via email to