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

Re: svn commit: r26813 - trunk/subversion/libsvn_client

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2007-09-28 09:05:07 CEST

>> --- trunk/subversion/libsvn_client/merge.c (original)
>> +++ trunk/subversion/libsvn_client/merge.c Thu Sep 27 12:38:58 2007
>> @@ -1623,7 +1623,7 @@
>>
>> if (merge_b->target_has_dummy_merge_range)
>> default_start = end;
>> - else if (children_with_mergeinfo)
>> + else if (children_with_mergeinfo && children_with_mergeinfo->nelts > 0)
>>
No need to check 'children_with_mergeinfo->nelts > 0' because of
'children_with_mergeinfo' is non-Null, it would be non-empty.
I marked this requirement in the docstring of
'drive_merge_report_editor' in r26822.
<snip from docstring of get_mergeinfo_paths>
  *CHILDREN_WITH_MERGEINFO is guaranteed to be non-empty with its first
   member being 'target' itself.
</snip>
>> {
>> svn_client__merge_path_t *target_merge_path_t;
>> target_merge_path_t = APR_ARRAY_IDX(children_with_mergeinfo, 0,
>> @@ -3797,6 +3797,8 @@
>> }
>> else
>> {
>> + children_with_mergeinfo =
>> + apr_array_make(pool, 0, sizeof(svn_client__merge_path_t *));
>> SVN_ERR(do_merge(URL1,
>> range.start,
>> URL2,
>>
>
> Hey Paul, why was this second case necesssary (e.g. where was the
> segfault)? drive_merge_report_editor() seems to handle a NULL hash
> okay, as does cleanup_noop_merge(). I didn't catch any other
> consumers of this hash. It'd be nice to drop the NULL initialization
> when declaring children_with_mergeinfo in svn_client_merge3(); it's
> already absent in svn_client_merge_peg3().
>
> Thanks, Dan
>
I addressed this too in r26822.

With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 28 09:05:32 2007

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.