Remove per-parent tree-conflict notifications from a merge. * subversion/libsvn_client/merge.c (is_path_conflicted_by_merge): (tree_conflict): (merge_dir_closed): (do_merge): Index: subversion/libsvn_client/merge.c =================================================================== --- subversion/libsvn_client/merge.c (revision 33844) +++ subversion/libsvn_client/merge.c (working copy) @@ -280,9 +280,6 @@ typedef struct merge_cmd_baton_t { svn_ra_session_t *ra_session1; svn_ra_session_t *ra_session2; - /* A list of directories containing tree conflicts. */ - apr_array_header_t *tree_conflicted_dirs; - /* During the merge, *USE_SLEEP is set to TRUE if a sleep will be required afterwards to ensure timestamp integrity, or unchanged if not. */ svn_boolean_t *use_sleep; @@ -323,30 +320,8 @@ is_path_conflicted_by_merge(merge_cmd_ba apr_hash_count(merge_b->conflicted_paths) > 0); } -/* Add the parent dir of VICTIM_PATH to the merge baton's list of - tree-conflicted directories, if it isn't already in the list. */ -static void -add_parent_to_tree_conflicted_dirs(merge_cmd_baton_t *merge_b, - const char *victim_path) -{ - const char *dir_path, *old_path; - int i; - - dir_path = svn_path_dirname(victim_path, merge_b->pool); - - for (i = 0; i < merge_b->tree_conflicted_dirs->nelts; i++) - { - old_path = APR_ARRAY_IDX(merge_b->tree_conflicted_dirs, i, - const char *); - if (strcmp(old_path, dir_path) == 0) - return; - } - - APR_ARRAY_PUSH(merge_b->tree_conflicted_dirs, const char *) = dir_path; -} - -/* Cause a tree conflict notification, and if the merge is not - * a dry run, also make the tree conflict persistent. Do nothing +/* Set *STATE (if STATE is non-null) to indicate a tree conflict, and if the + * merge is not a dry run, also make the tree conflict persistent. Do nothing * if the merge is record-only. * * The tree conflict, with its victim specified by VICTIM_PATH, is @@ -359,7 +334,8 @@ add_parent_to_tree_conflicted_dirs(merge * of the same names in svn_wc_conflict_description_t. */ static svn_error_t* -tree_conflict(merge_cmd_baton_t *merge_b, +tree_conflict(/*svn_wc_notify_state_t *state,*/ + merge_cmd_baton_t *merge_b, svn_wc_adm_access_t *adm_access, const char *victim_path, svn_node_kind_t node_kind, @@ -370,8 +346,9 @@ tree_conflict(merge_cmd_baton_t *merge_b if (merge_b->record_only) return SVN_NO_ERROR; - - add_parent_to_tree_conflicted_dirs(merge_b, victim_path); + + /*if (state) + *state = svn_wc_notify_state_conflicted;*/ if (merge_b->dry_run) return SVN_NO_ERROR; @@ -384,26 +361,6 @@ tree_conflict(merge_cmd_baton_t *merge_b return SVN_NO_ERROR; } -/* TRUE iff DIR_PATH is in the merge baton's list of tree-conflicted - directories. */ -static svn_boolean_t -is_tree_conflicted_dir_p(merge_cmd_baton_t *merge_b, - const char *dir_path) -{ - const char *old_path; - int i; - - for (i = 0; i < merge_b->tree_conflicted_dirs->nelts; i++) - { - old_path = APR_ARRAY_IDX(merge_b->tree_conflicted_dirs, i, - const char *); - if (strcmp(old_path, dir_path) == 0) - return TRUE; - } - - return FALSE; -} - /* Set *HONOR_MERGEINFO and *RECORD_MERGEINFO (if non-NULL) based on the merge being performed as described in MERGE_B. @@ -1856,18 +1813,8 @@ merge_dir_closed(svn_wc_adm_access_t *ad const char *path, void *baton) { - merge_cmd_baton_t *merge_b = baton; - if (state) - { - /* Check if we encountered any tree conflicts - * in this directory while visiting it. - */ - if (is_tree_conflicted_dir_p(merge_b, path)) - *state = svn_wc_notify_state_conflicted; - else - *state = svn_wc_notify_state_unknown; - } + *state = svn_wc_notify_state_unknown; return SVN_NO_ERROR; } @@ -6292,8 +6239,6 @@ do_merge(apr_array_header_t *merge_sourc merge_cmd_baton.paths_with_new_mergeinfo = NULL; merge_cmd_baton.ra_session1 = ra_session1; merge_cmd_baton.ra_session2 = ra_session2; - merge_cmd_baton.tree_conflicted_dirs = - apr_array_make(pool, 0, sizeof(const char *)); /* Populate the portions of the merge context baton that require an RA session to set, but shouldn't be reset for each iteration. */