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