subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1688930 - /subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c
Date Thu, 02 Jul 2015 23:32:25 GMT
Author: stefan2
Date: Thu Jul  2 23:32:25 2015
New Revision: 1688930

URL: http://svn.apache.org/r1688930
Log:
On the svn-mergeinfo-normalizer branch:

* tools/client-side/svn-mergeinfo-normalizer/logic.c
  (remove_obsolete_lines): Use an ITERPOOL inside the loop.

Modified:
    subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c

Modified: subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c?rev=1688930&r1=1688929&r2=1688930&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c
(original)
+++ subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c
Thu Jul  2 23:32:25 2015
@@ -140,6 +140,7 @@ remove_obsolete_lines(svn_min__branch_lo
   int i;
   apr_hash_index_t *hi;
   unsigned initial_count;
+  apr_pool_t *iterpool;
 
   if (!opt_state->remove_obsoletes)
     return SVN_NO_ERROR;
@@ -147,6 +148,7 @@ remove_obsolete_lines(svn_min__branch_lo
   initial_count = apr_hash_count(mergeinfo);
   to_remove = apr_array_make(scratch_pool, 16, sizeof(const char *));
 
+  iterpool = svn_pool_create(scratch_pool);
   for (hi = apr_hash_first(scratch_pool, mergeinfo);
        hi;
        hi = apr_hash_next(hi))
@@ -154,8 +156,9 @@ remove_obsolete_lines(svn_min__branch_lo
       const char *path = apr_hash_this_key(hi);
       svn_boolean_t deleted;
 
+      svn_pool_clear(iterpool);
       SVN_ERR(svn_min__branch_lookup(&deleted, lookup, path, local_only,
-                                     scratch_pool));
+                                     iterpool));
       if (deleted)
         APR_ARRAY_PUSH(to_remove, const char *) = path;
     }
@@ -167,6 +170,7 @@ remove_obsolete_lines(svn_min__branch_lo
     }
 
   progress->obsoletes_removed += initial_count - apr_hash_count(mergeinfo);
+  svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;
 }



Mime
View raw message