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

Re: svn commit: r1311847 - /subversion/trunk/subversion/libsvn_delta/compat.c

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Wed, 11 Apr 2012 08:20:24 -0500

Actually, only the first two need to end up in result_pool; the third
is used as an argument for a local function call, not stored anywhere
permanently. r1324754 fixes the first two.

-Hyrum

On Tue, Apr 10, 2012 at 6:41 PM, Greg Stein <gstein_at_gmail.com> wrote:
> All of these should go into result_pool
>
> On Apr 10, 2012 12:32 PM, <hwright_at_apache.org> wrote:
>>
>> Author: hwright
>> Date: Tue Apr 10 16:31:48 2012
>> New Revision: 1311847
>>
>> URL: http://svn.apache.org/viewvc?rev=1311847&view=rev
>> Log:
>> Use proper relpath manipulation functions, rather than apr_pstrcat().
>>
>> * subversion/libsvn_delta/compat.c
>>  (ev2_add_directory, ev2_open_directory, ev2_open_file): As above.
>>
>> Modified:
>>    subversion/trunk/subversion/libsvn_delta/compat.c
>>
>> Modified: subversion/trunk/subversion/libsvn_delta/compat.c
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1311847&r1=1311846&r2=1311847&view=diff
>>
>> ==============================================================================
>> --- subversion/trunk/subversion/libsvn_delta/compat.c (original)
>> +++ subversion/trunk/subversion/libsvn_delta/compat.c Tue Apr 10 16:31:48
>> 2012
>> @@ -745,8 +745,8 @@ ev2_add_directory(const char *path,
>>       if (pb->copyfrom_path)
>>         {
>>           const char *name = svn_relpath_basename(relpath, scratch_pool);
>> -          cb->copyfrom_path = apr_pstrcat(result_pool, pb->copyfrom_path,
>> -                                          "/", name, NULL);
>> +          cb->copyfrom_path = svn_relpath_join(pb->copyfrom_path, name,
>> +                                               scratch_pool);
>>           cb->copyfrom_rev = pb->copyfrom_rev;
>>         }
>>     }
>> @@ -792,8 +792,8 @@ ev2_open_directory(const char *path,
>>       /* We are inside a copy. */
>>       const char *name = svn_relpath_basename(relpath, scratch_pool);
>>
>> -      db->copyfrom_path = apr_pstrcat(result_pool, pb->copyfrom_path,
>> -                                      "/", name, NULL);
>> +      db->copyfrom_path = svn_relpath_join(pb->copyfrom_path, name,
>> +                                           scratch_pool);
>>       db->copyfrom_rev = pb->copyfrom_rev;
>>     }
>>
>> @@ -916,8 +916,8 @@ ev2_open_file(const char *path,
>>       /* We're in a copied directory, so the delta base is going to be
>>          based up on the copy source. */
>>       const char *name = svn_relpath_basename(relpath, scratch_pool);
>> -      const char *copyfrom_path = apr_pstrcat(result_pool,
>> pb->copyfrom_path,
>> -                                              "/", name, NULL);
>> +      const char *copyfrom_path = svn_relpath_join(pb->copyfrom_path,
>> name,
>> +                                                   scratch_pool);
>>
>>       SVN_ERR(fb->eb->fetch_base_func(&fb->delta_base,
>>                                       fb->eb->fetch_base_baton,
>>
>>
>

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Received on 2012-04-11 15:21:01 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.