When merging into a file with preexisting local modifications, our code
in merge.c:merge_file_changed() always reports a mer'G'e has occurred,
even if the merge made no change to the file (i.e. svn_wc_merge2()
returns a merge outcome of svn_wc_merge_unchanged).
This results in a lot of incorrect notifications with merge-tracking -
see http://svn.haxx.se/dev/archive-2007-03/1157.shtml But I'd argue
it's incorrect regardless of merge-tracking and would like to apply the
attached patch. I see no problems with this, but Philip Martin's
question in merge_file_changed()...
/* Philip asks "Why?" Why does the notification depend on whether
the
file had modifications before the merge? If the merge didn't
change
the file because the local mods already included the change why
does
that result it "merged" notification? That's information
available
through the status command, while the fact that the merge
didn't
change the file is lost :-( */
if (content_state)
{
if (merge_outcome == svn_wc_merge_conflict)
*content_state = svn_wc_notify_state_conflicted;
else if (has_local_mods)
*content_state = svn_wc_notify_state_merged;
else if (merge_outcome == svn_wc_merge_merged)
*content_state = svn_wc_notify_state_changed;
else if (merge_outcome == svn_wc_merge_no_merge)
*content_state = svn_wc_notify_state_missing;
else /* merge_outcome == svn_wc_merge_unchanged */
*content_state = svn_wc_notify_state_unchanged;
...has been there a long time and *something* gave him pause or I
suspect he would have fixed this way back in the day...
Anyone know the history of this and/or have any objections?
Thanks,
Paul B.
[[[
Stop mer'G'e notifications for locally modified files unchanged by a
merge.
* subversion/libsvn_client/merge.c
(merge_file_changed): Make merge notifications for a given file
dependent on
the outcome of the merge, not the local modification status of the
file prior
to the merge. Remove philip's longstanding puzzlement comment.
* subversion/tests/cmdline/merge_tests.py
(textual_merges_galore,
obey_reporter_api_semantics_while_doing_subtree_merges): Remove merge
notifications no longer expected.
]]]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 4 13:58:27 2007