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

Re: [PATCH] Re: Reviewing r34562

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Wed, 17 Dec 2008 10:28:32 -0500

Kamesh, I'm not in a position to do testing at the moment. Are you able to
shepherd this through?

Kamesh Jayachandran wrote:
> +1.
>
> With regards
> Kamesh Jayachandran
>
> C. Michael Pilato wrote:
>> C. Michael Pilato wrote:
>>> Julian Foad wrote:
>>>> Kamesh Jayachandran wrote:
>>>>> Thanks Julian fixed in r34760(revert of r34756) and r34762.
>>>> [[[
>>>> $ svn diff -c34762
>>>> Index: subversion/libsvn_client/merge.c
>>>> ===================================================================
>>>> --- subversion/libsvn_client/merge.c (revision 34761)
>>>> +++ subversion/libsvn_client/merge.c (revision 34762)
>>>> @@ -6374,10 +6374,7 @@
>>>> SVN_ERR_ASSERT(svn_path_is_child(abs_target_path,
>>>> abs_added_path,
>>>> iterpool));
>>>> - common_ancestor_path =
>>>> - svn_path_get_longest_ancestor(abs_added_path,
>>>> - abs_target_path,
>>>> - iterpool);
>>>> + common_ancestor_path = abs_target_path;
>>>> /* Need to +1 to avoid a leading '/'. */
>>>> rel_added_path =
>>>> abs_added_path + strlen(common_ancestor_path) + 1;
>>>> ]]]
>>>>
>>>> That looks better, but isn't the next line simply setting rel_added_path
>>>> to the result of the svn_path_is_child() call above?
>>> Yup.
>>>
>> Is this what's needed here?
>
>> Index: subversion/libsvn_client/merge.c
>> ===================================================================
>> --- subversion/libsvn_client/merge.c (revision 34765)
>> +++ subversion/libsvn_client/merge.c (working copy)
>> @@ -6340,7 +6340,7 @@
>> svn_mergeinfo_t merge_mergeinfo, added_path_mergeinfo;
>> apr_array_header_t *rangelist;
>> const svn_wc_entry_t *entry;
>> - const char *rel_added_path, *common_ancestor_path,
>> + const char *rel_added_path,
>> *abs_added_path, *abs_target_path,
>> *added_path_mergeinfo_path;
>
>> @@ -6369,15 +6369,14 @@
>> SVN_ERR(svn_path_get_absolute(&abs_added_path,
>> added_path,
>> iterpool));
>> +
>> /* abs_added_path had better be a child of abs_target_path
>> or something is *really* wrong. */
>> - SVN_ERR_ASSERT(svn_path_is_child(abs_target_path,
>> - abs_added_path,
>> - iterpool));
>> - common_ancestor_path = abs_target_path;
>> - /* Need to +1 to avoid a leading '/'. */
>> - rel_added_path =
>> - abs_added_path + strlen(common_ancestor_path) + 1;
>> + rel_added_path = svn_path_is_child(abs_target_path,
>> + abs_added_path,
>> + iterpool);
>> + SVN_ERR_ASSERT(rel_added_path);
>> +
>> added_path_mergeinfo_path = svn_path_join(mergeinfo_path,
>> rel_added_path,
>> iterpool);
>

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=985783

Received on 2008-12-17 16:28:57 CET

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.