subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1189286 - /subversion/trunk/subversion/libsvn_client/mergeinfo.c
Date Wed, 26 Oct 2011 16:14:37 GMT
Author: julianfoad
Date: Wed Oct 26 16:14:37 2011
New Revision: 1189286

URL: http://svn.apache.org/viewvc?rev=1189286&view=rev
Log:
* subversion/libsvn_client/mergeinfo.c
  (svn_client_mergeinfo_log): Eliminate unnecessary string duplications.

Modified:
    subversion/trunk/subversion/libsvn_client/mergeinfo.c

Modified: subversion/trunk/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mergeinfo.c?rev=1189286&r1=1189285&r2=1189286&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_client/mergeinfo.c Wed Oct 26 16:14:37 2011
@@ -1877,8 +1877,7 @@ svn_client_mergeinfo_log(svn_boolean_t f
           SVN_ERR(svn_rangelist__merge_many(subtree_merged_rangelist,
                                             merged, scratch_pool, iterpool));
 
-          apr_hash_set(inheritable_subtree_merges,
-                       apr_pstrdup(scratch_pool, subtree_path),
+          apr_hash_set(inheritable_subtree_merges, subtree_path,
                        APR_HASH_KEY_STRING, subtree_merged_rangelist);
         }
       else
@@ -1886,8 +1885,7 @@ svn_client_mergeinfo_log(svn_boolean_t f
           /* Map SUBTREE_PATH to an empty rangelist if there was nothing
              fully merged. e.g. Only empty or non-inheritable mergienfo
              on the subtree or mergeinfo unrelated to the source. */
-          apr_hash_set(inheritable_subtree_merges,
-                       apr_pstrdup(scratch_pool, subtree_path),
+          apr_hash_set(inheritable_subtree_merges, subtree_path,
                        APR_HASH_KEY_STRING,
                        apr_array_make(scratch_pool, 0,
                        sizeof(svn_merge_range_t *)));
@@ -1979,10 +1977,10 @@ svn_client_mergeinfo_log(svn_boolean_t f
   else
     {
       /* Determine the correct (youngest) target for 'svn log'. */
-      svn_merge_range_t *youngest_range = svn_merge_range_dup(
-        APR_ARRAY_IDX(master_inheritable_rangelist,
-        master_inheritable_rangelist->nelts - 1,
-        svn_merge_range_t *), scratch_pool);
+      svn_merge_range_t *youngest_range
+        = APR_ARRAY_IDX(master_inheritable_rangelist,
+                        master_inheritable_rangelist->nelts - 1,
+                        svn_merge_range_t *);
       apr_array_header_t *youngest_rangelist =
         svn_rangelist__initialize(youngest_range->end - 1,
                                   youngest_range->end,
@@ -1997,17 +1995,17 @@ svn_client_mergeinfo_log(svn_boolean_t f
           apr_array_header_t *subtree_merged_rangelist =
             svn__apr_hash_index_val(hi);
           apr_array_header_t *intersecting_rangelist;
+
           svn_pool_clear(iterpool);
           SVN_ERR(svn_rangelist_intersect(&intersecting_rangelist,
                                           youngest_rangelist,
                                           subtree_merged_rangelist,
                                           FALSE, iterpool));
 
-          APR_ARRAY_PUSH(merge_source_fspaths, const char *) =
-            apr_pstrdup(scratch_pool, key);
+          APR_ARRAY_PUSH(merge_source_fspaths, const char *) = key;
 
           if (intersecting_rangelist->nelts)
-            log_target = apr_pstrdup(scratch_pool, key);
+            log_target = key;
         }
     }
 



Mime
View raw message