Author: stsp
Date: Thu Jun 13 13:48:06 2013
New Revision: 1492670
URL: http://svn.apache.org/r1492670
Log:
Improve the interactive conflict resolution menu for 'incoming dir edit vs.
local dir deletion', and don't show this menu for unrelated conflict cases.
* subversion/svn/conflict-callbacks.c
(tree_conflict_options_update_replaced): Remove, now redundant.
(tree_conflict_options_update_deleted): Rename to ...
(tree_conflict_options_update_edit_deleted_dir): ... this, and tweak the
menu entries and help strings for clarity. Remove the 'r' option from
this menu because it is usually the wrong choice, and can also be
reached via 'svn resolve --accept working'.
(handle_tree_conflict): Tweak logic to only show the above menu for the
'incoming dir edit' case.
Modified:
subversion/trunk/subversion/svn/conflict-callbacks.c
Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1492670&r1=1492669&r2=1492670&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Thu Jun 13 13:48:06
2013
@@ -574,14 +574,12 @@ static const resolver_option_t tree_conf
{ NULL }
};
-static const resolver_option_t tree_conflict_options_update_deleted[] =
+static const resolver_option_t tree_conflict_options_update_edit_deleted_dir[]
=
{
- { "mc", N_("keep affected local moves"), N_("keep any local moves affected "
- "by this deletion
[mine-conflict]"),
+ { "mc", N_("prepare for updating moved-away children, if any (recommended)"),
+ N_("allow updating moved-away children "
+ "with 'svn resolve' [mine-conflict]"),
svn_wc_conflict_choose_mine_conflict },
- { "r", N_("mark resolved (breaks moves)"), N_("mark resolved, any affected
"
- "moves will become copies"),
- svn_wc_conflict_choose_merged },
{ "p", N_("postpone"), N_("resolve the conflict later [postpone]"),
svn_wc_conflict_choose_postpone },
{ "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
@@ -590,23 +588,6 @@ static const resolver_option_t tree_conf
{ NULL }
};
-static const resolver_option_t tree_conflict_options_update_replaced[] =
-{
- { "mc", N_("keep affected local moves"), N_("keep any moves affected by this
"
- "replacement [mine-conflict]"),
- svn_wc_conflict_choose_mine_conflict },
- { "r", N_("mark resolved (breaks moves)"), N_("mark resolved (any affected "
- "moves will become copies)"),
- svn_wc_conflict_choose_merged },
- { "p", N_("postpone"), N_("resolve the conflict later [postpone]"),
- svn_wc_conflict_choose_postpone },
- { "q", N_("quit resolution"), N_("postpone all remaining conflicts"),
- svn_wc_conflict_choose_postpone },
- { "h", N_("help"), N_("show this help (also '?')"), -1 },
- { NULL }
-};
-
-
/* Return a pointer to the option description in OPTIONS matching the
* one- or two-character OPTION_CODE. Return NULL if not found. */
static const resolver_option_t *
@@ -1102,10 +1083,15 @@ handle_tree_conflict(svn_wc_conflict_res
else
tc_opts = tree_conflict_options_update_moved_away;
}
- else if (desc->reason == svn_wc_conflict_reason_deleted)
- tc_opts = tree_conflict_options_update_deleted;
- else if (desc->reason == svn_wc_conflict_reason_replaced)
- tc_opts = tree_conflict_options_update_replaced;
+ else if (desc->reason == svn_wc_conflict_reason_deleted ||
+ desc->reason == svn_wc_conflict_reason_replaced)
+ {
+ if (desc->action == svn_wc_conflict_action_edit &&
+ desc->node_kind == svn_node_dir)
+ tc_opts = tree_conflict_options_update_edit_deleted_dir;
+ else
+ tc_opts = tree_conflict_options;
+ }
else
tc_opts = tree_conflict_options;
}