On Wed, Dec 7, 2011 at 6:26 AM, Julian Foad <julianfoad_at_btopenworld.com> wrote:
>> Author: pburba
>
>> Date: Tue Dec 6 22:04:22 2011
>> New Revision: 1211199
>>
>> URL: http://svn.apache.org/viewvc?rev=1211199&view=rev
>> Log:
>> Fix issue #4057 "don't record non-inheritable mergeinfo in shallow
>> merge if entire diff is within requested depth".
>>
>> * subversion/libsvn_client/merge.c
>>
>> Â (calculate_merge_inheritance): Don't unconditionally set non-inheritable
>> Â Â mergeinfo on the merge target if the operational depth is shallow.
>> Â Â Instead rely on the caller to determine if this is necessary.
> [...]
>
>> Â Â WC_PATH_HAS_MISSING_CHILD is true if WC_PATH is missing an immediate child
>> Â Â because the child is switched or absent from the WC, or due to a sparse
>> -Â Â checkout -- see get_mergeinfo_paths().
>> +Â Â checkout (see get_mergeinfo_paths) or because DEPTH is shallow
>> +Â Â (i.e. < svn_depth_infinity) and the merge would affect a child if
>> +Â Â performed at a deeper depth.
>
> Does the phrase "and the merge would affect a child" apply to the parameter as a whole?  It sounds like it's asking the caller to determine whether the diff would have affected a missing child in some cases but not in other cases.  (I haven't tried to see whether the caller actually does make that determination in the other cases.)  More concretely: if WC_PATH is missing an immediate child because the child is switched or absent from the WC, or due to a sparse checkout, then I think the caller should pass TRUE only if the diff would affect that child.  Maybe that's what you meant already.
Hi Julian,
Yes that's what I meant. But it's a moot point now: In fixing another
issue #4057 bug (see r1211647) I moved this function's code inline to
its only caller. I also tried to improve the comments there to better
explain what is going on. Let me know if that doesn't clear things
up.
Paul
> - Julian
>
>
>> Â Â Perform any temporary allocations in SCRATCH_POOL. */
>> static svn_error_t *
>> @@ -4543,9 +4545,7 @@ calculate_merge_inheritance(svn_boolean_
>> Â Â Â {
>> Â Â Â Â if (wc_path_is_merge_target)
>> Â Â Â Â Â {
>> -Â Â Â Â Â if (wc_path_has_missing_child
>> -Â Â Â Â Â Â Â || depth == svn_depth_files
>> -Â Â Â Â Â Â Â || depth == svn_depth_empty)
>> +Â Â Â Â Â if (wc_path_has_missing_child)
>> Â Â Â Â Â Â Â {
>> Â Â Â Â Â Â Â Â *non_inheritable = TRUE;
>> Â Â Â Â Â Â Â }
Received on 2011-12-07 22:39:46 CET