[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH][merge-tracking]Better way to iterate the locally scoped hashes

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2007-01-22 10:59:21 CET

Hi All,
Find the attached patch and log.

With regards
Kamesh Jayachandran

[[[

Better way to iterate locally scoped hashes.

* subversion/libsvn_client/diff.c
  (display_mergeinfo_diff, update_wc_merge_info, do_child_merges):
   Use hash's iterator rather than allocating from the pool for
   locally scoped hashes.

Patch by: kameshj
]]]

Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c (revision 23162)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -123,7 +123,7 @@
   SVN_ERR(svn_mergeinfo_diff(&deleted, &added, orig_mergeinfo_hash,
                              new_mergeinfo_hash, pool));
 
- for (hi = apr_hash_first(pool, deleted);
+ for (hi = apr_hash_first(NULL, deleted);
        hi; hi = apr_hash_next(hi))
     {
       const void *key;
@@ -141,7 +141,7 @@
                                     from_path, merge_revstr->data));
     }
 
- for (hi = apr_hash_first(pool, added);
+ for (hi = apr_hash_first(NULL, added);
        hi; hi = apr_hash_next(hi))
     {
       const void *key;
@@ -2073,7 +2073,7 @@
 
   /* Combine the merge info for the revision range just merged into
      the WC with its on-disk merge info. */
- for (hi = apr_hash_first(pool, merges); hi; hi = apr_hash_next(hi))
+ for (hi = apr_hash_first(NULL, merges); hi; hi = apr_hash_next(hi))
     {
       const void *key;
       void *value;
@@ -3524,7 +3524,7 @@
                                        TRUE,
                                        merge_cmd_baton->ctx,
                                        pool));
- for (hi = apr_hash_first(pool, children_with_mergeinfo);
+ for (hi = apr_hash_first(NULL, children_with_mergeinfo);
        hi;
        hi = apr_hash_next(hi))
     {

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 22 10:59:27 2007

This is an archived mail posted to the Subversion Dev mailing list.