You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/02/07 14:44:03 UTC
svn commit: r1443470 - /subversion/trunk/subversion/libsvn_client/merge.c
Author: rhuijben
Date: Thu Feb 7 13:44:02 2013
New Revision: 1443470
URL: http://svn.apache.org/viewvc?rev=1443470&view=rev
Log:
Tweak the recording of merge tree conflicts to produce the right details when
a merge replaces a directory with a file, or the other way around.
* subversion/libsvn_client/merge.c
(record_tree_conflict): Copy left_source from the old conflict if one exists.
(merge_file_opened): Always replace the conflict from this function, for
replacement conflicts, just like merge_dir_opened.
Modified:
subversion/trunk/subversion/libsvn_client/merge.c
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1443470&r1=1443469&r2=1443470&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Thu Feb 7 13:44:02 2013
@@ -1362,6 +1362,10 @@ record_tree_conflict(merge_cmd_baton_t *
&merge_b->merge_source, merge_b->target,
result_pool, scratch_pool));
+ /* Fix up delete of file, add of dir replacement (or other way around) */
+ if (existing_conflict != NULL && existing_conflict->src_left_version)
+ left = existing_conflict->src_left_version;
+
conflict = svn_wc_conflict_description_create_tree2(
local_abspath, node_kind, svn_wc_operation_merge,
left, right, result_pool);
@@ -1878,6 +1882,14 @@ merge_file_opened(void **new_file_baton,
fb->tree_conflict_action = svn_wc_conflict_action_replace;
fb->tree_conflict_reason = old_tc->reason;
+ /* Update the tree conflict to store that this is a replace */
+ SVN_ERR(record_tree_conflict(merge_b, local_abspath, pdb,
+ svn_node_file,
+ fb->tree_conflict_action,
+ fb->tree_conflict_reason,
+ old_tc, FALSE,
+ scratch_pool));
+
if (old_tc->reason == svn_wc_conflict_reason_deleted
|| old_tc->reason == svn_wc_conflict_reason_moved_away)
{
@@ -1891,14 +1903,6 @@ merge_file_opened(void **new_file_baton,
{
*skip = TRUE;
- /* Update the tree conflict to store that this is a replace */
- SVN_ERR(record_tree_conflict(merge_b, local_abspath, pdb,
- svn_node_file,
- fb->tree_conflict_action,
- fb->tree_conflict_reason,
- old_tc, FALSE,
- scratch_pool));
-
return SVN_NO_ERROR;
}
}