Re-do r1781862 correctly.
* subversion/libsvn_client/conflicts.c
(configure_option_incoming_move_file_merge,
configure_option_incoming_dir_merge): Use get_moved_to_repos_relpath() to
set the initial default path.
@@ -9144,7 +9144,6 @@ configure_option_incoming_move_file_merge(svn_client_conflict_t *conflict,
incoming_change == svn_wc_conflict_action_delete)
{
const char *victim_abspath;
- apr_array_header_t *move_target_repos_relpaths;
const char *description;
victim_abspath = svn_client_conflict_get_local_abspath(conflict);
@@ -9164,28 +9163,13 @@ configure_option_incoming_move_file_merge(svn_client_conflict_t *conflict,
incoming_new_pegrev,
conflict->pool, scratch_pool));
}
- if (apr_hash_count(details->wc_move_targets) > 0)
- {
- svn_sort__item_t item;
/* Initialize to the first possible move target. Hopefully,
* in most cases there will only be one candidate anyway. */
- move_target_repos_relpaths =
- svn_sort__hash(details->wc_move_targets,
- svn_sort_compare_items_as_paths,
- scratch_pool);
- item = APR_ARRAY_IDX(move_target_repos_relpaths, 0,
- svn_sort__item_t);
- details->move_target_repos_relpath = item.key;
+ details->move_target_repos_relpath =
+ get_moved_to_repos_relpath(details, scratch_pool);
details->wc_move_target_idx = 0;
}
- else
- {
- details->move_target_repos_relpath = NULL;
- details->wc_move_target_idx = 0;
- return SVN_NO_ERROR;
- }
- }
if (apr_hash_count(details->wc_move_targets) == 0)
return SVN_NO_ERROR;
@@ -9248,7 +9232,6 @@ configure_option_incoming_dir_merge(svn_client_conflict_t *conflict,
const char *description;
const char *wcroot_abspath;
const char *victim_abspath;
- apr_array_header_t *move_target_repos_relpaths;
victim_abspath = svn_client_conflict_get_local_abspath(conflict);
SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx,
@@ -9271,28 +9254,13 @@ configure_option_incoming_dir_merge(svn_client_conflict_t *conflict,
incoming_new_pegrev,
conflict->pool, scratch_pool));
}
- if (apr_hash_count(details->wc_move_targets) > 0)
- {
- svn_sort__item_t item;
/* Initialize to the first possible move target. Hopefully,
* in most cases there will only be one candidate anyway. */
- move_target_repos_relpaths =
- svn_sort__hash(details->wc_move_targets,
- svn_sort_compare_items_as_paths,
- scratch_pool);
- item = APR_ARRAY_IDX(move_target_repos_relpaths, 0,
- svn_sort__item_t);
- details->move_target_repos_relpath = item.key;
+ details->move_target_repos_relpath =
+ get_moved_to_repos_relpath(details, scratch_pool);
details->wc_move_target_idx = 0;
}
- else
- {
- details->move_target_repos_relpath = NULL;
- details->wc_move_target_idx = 0;
- return SVN_NO_ERROR;
- }
- }
if (apr_hash_count(details->wc_move_targets) == 0)
return SVN_NO_ERROR;
