You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/02/19 18:09:33 UTC
svn commit: r1731274 - in /subversion/trunk/subversion: include/svn_client.h
libsvn_client/resolved.c
Author: stsp
Date: Fri Feb 19 17:09:33 2016
New Revision: 1731274
URL: http://svn.apache.org/viewvc?rev=1731274&view=rev
Log:
Add a unique conflict option ID for accepting the current state of the
working copy when resolving a tree conflict. Previously, this resolution
was mapped to 'merged text'.
* subversion/include/svn_client.h
(svn_client_conflict_option_accept_current_wc_state): New option ID.
* subversion/libsvn_client/resolved.c
(resolve_tree_conflict, svn_client_conflict_tree_get_resolution_options): Use
the new option ID.
(svn_client_conflict_tree_resolve_by_id): Provide a backwards compat hack
just in case an API user needs it.
Modified:
subversion/trunk/subversion/include/svn_client.h
subversion/trunk/subversion/libsvn_client/resolved.c
Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1731274&r1=1731273&r2=1731274&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Fri Feb 19 17:09:33 2016
@@ -4397,6 +4397,9 @@ typedef enum svn_client_conflict_option_
/* Tree conflict resolution options start here. */
+ /* Accept current working copy state. */
+ svn_client_conflict_option_accept_current_wc_state,
+
/* Options for local move vs incoming edit on update. */
svn_client_conflict_option_update_move_destination,
Modified: subversion/trunk/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/resolved.c?rev=1731274&r1=1731273&r2=1731274&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/resolved.c (original)
+++ subversion/trunk/subversion/libsvn_client/resolved.c Fri Feb 19 17:09:33 2016
@@ -816,7 +816,7 @@ resolve_tree_conflict(svn_client_conflic
operation == svn_wc_operation_switch) &&
(local_change == svn_wc_conflict_reason_deleted ||
local_change == svn_wc_conflict_reason_replaced) &&
- option_id == svn_client_conflict_option_merged_text)
+ option_id == svn_client_conflict_option_accept_current_wc_state)
{
err = svn_wc__conflict_tree_update_break_moved_away(ctx->wc_ctx,
local_abspath,
@@ -861,7 +861,7 @@ resolve_tree_conflict(svn_client_conflic
local_change == svn_wc_conflict_reason_moved_away &&
incoming_change == svn_wc_conflict_action_edit &&
option_id ==
- svn_client_conflict_option_merged_text)
+ svn_client_conflict_option_accept_current_wc_state)
{
/* We must break the move if the user accepts the current
* working copy state instead of updating the move.
@@ -874,7 +874,7 @@ resolve_tree_conflict(svn_client_conflic
ctx->notify_baton2,
scratch_pool);
}
- else if (option_id != svn_client_conflict_option_merged_text)
+ else if (option_id != svn_client_conflict_option_accept_current_wc_state)
{
err = svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
_("Tree conflict on '%s' can only be resolved "
@@ -1190,7 +1190,7 @@ svn_client_conflict_tree_get_resolution_
/* Add an option which marks the conflict resolved. */
option = apr_pcalloc(result_pool, sizeof(*option));
- option->id = svn_client_conflict_option_merged_text;
+ option->id = svn_client_conflict_option_accept_current_wc_state;
option->description = _("accept current working copy state");
option->conflict = conflict;
option->do_resolve_func = resolve_tree_conflict;
@@ -1435,6 +1435,11 @@ svn_client_conflict_tree_resolve_by_id(
}
}
}
+ else if (option_id == svn_client_conflict_option_merged_text)
+ {
+ /* Another backwards compatibility hack for 'choose merged'. */
+ option_id = svn_client_conflict_option_accept_current_wc_state;
+ }
SVN_ERR(svn_client_conflict_tree_get_resolution_options(
&resolution_options, conflict,