subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1187469 - /subversion/trunk/subversion/libsvn_repos/log.c
Date Fri, 21 Oct 2011 17:08:42 GMT
Author: hwright
Date: Fri Oct 21 17:08:42 2011
New Revision: 1187469

URL: http://svn.apache.org/viewvc?rev=1187469&view=rev
Log:
Improve memory management slightly in 'log -g' by using a non-deprecated
function.

* subversion/libsvn_repos/log.c
  (fs_mergeinfo_changed, get_combined_mergeinfo_changes): Use
    svn_mergeinfo_diff2(), which removes the need to dup mergeinfo into a
    result pool.

Modified:
    subversion/trunk/subversion/libsvn_repos/log.c

Modified: subversion/trunk/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/log.c?rev=1187469&r1=1187468&r2=1187469&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/log.c (original)
+++ subversion/trunk/subversion/libsvn_repos/log.c Fri Oct 21 17:08:42 2011
@@ -711,17 +711,16 @@ fs_mergeinfo_changed(svn_mergeinfo_catal
           if (prev_mergeinfo_value)
             SVN_ERR(svn_mergeinfo_parse(&prev_mergeinfo,
                                         prev_mergeinfo_value->data, iterpool));
-          SVN_ERR(svn_mergeinfo_diff(&deleted, &added, prev_mergeinfo,
-                                     mergeinfo, FALSE, iterpool));
+          SVN_ERR(svn_mergeinfo_diff2(&deleted, &added, prev_mergeinfo,
+                                      mergeinfo, FALSE, result_pool,
+                                      iterpool));
 
           /* Toss interesting stuff into our return catalogs. */
           hash_path = apr_pstrdup(result_pool, changed_path);
           apr_hash_set(*deleted_mergeinfo_catalog, hash_path,
-                       APR_HASH_KEY_STRING, svn_mergeinfo_dup(deleted,
-                                                              result_pool));
+                       APR_HASH_KEY_STRING, deleted);
           apr_hash_set(*added_mergeinfo_catalog, hash_path,
-                       APR_HASH_KEY_STRING, svn_mergeinfo_dup(added,
-                                                              result_pool));
+                       APR_HASH_KEY_STRING, added);
         }
     }
 
@@ -859,13 +858,11 @@ get_combined_mergeinfo_changes(svn_merge
         continue;
 
       /* Compare, constrast, and combine the results. */
-      SVN_ERR(svn_mergeinfo_diff(&deleted, &added, prev_mergeinfo,
-                                 mergeinfo, FALSE, iterpool));
-      SVN_ERR(svn_mergeinfo_merge2(*deleted_mergeinfo,
-                                   svn_mergeinfo_dup(deleted, result_pool),
+      SVN_ERR(svn_mergeinfo_diff2(&deleted, &added, prev_mergeinfo,
+                                  mergeinfo, FALSE, result_pool, iterpool));
+      SVN_ERR(svn_mergeinfo_merge2(*deleted_mergeinfo, deleted,
                                    result_pool, iterpool));
-      SVN_ERR(svn_mergeinfo_merge2(*added_mergeinfo,
-                                   svn_mergeinfo_dup(added, result_pool),
+      SVN_ERR(svn_mergeinfo_merge2(*added_mergeinfo, added,
                                    result_pool, iterpool));
      }
 



Mime
View raw message