subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1449764 - /subversion/trunk/subversion/svn/conflict-callbacks.c
Date Mon, 25 Feb 2013 16:22:48 GMT
Author: stsp
Date: Mon Feb 25 16:22:47 2013
New Revision: 1449764

URL: http://svn.apache.org/r1449764
Log:
Tidy up the interactive conflict prompt menus for tree conflicts a bit.

* subversion/svn/conflict-callbacks.c
  (tree_conflict_options): By default, we can only offer resolution to
   the 'working' state, so remove 'mine-conflict' and 'theirs-conflict'
   from the default tree conflict option menu.
  (tree_conflict_options_update_moved_away): Offer 'resolved' instead of
   'theirs-conflict', since 'resolved' is usually the same as '--accept
   working', and because 'theirs-conflict' isn't a valid choice anymore
   at the API level as of r1449761. Tweak option descriptions to better
   explain the effects of the 'mine-conflict' and 'resolved' options.
  (tree_conflict_options_update_deleted): New option menu for tree conflicts
   involving incoming deletions during updates. This could be improved since
   it mentions local moves even if no local moves exist, but it makes careful
   use of the word "any" to accommodate for that.
  (handle_tree_conflict): Print new menu for tree-conflicts involving incoming
   deletions during updates.

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=1449764&r1=1449763&r2=1449764&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Mon Feb 25 16:22:47 2013
@@ -382,10 +382,6 @@ static const resolver_option_t tree_conf
                               svn_wc_conflict_choose_postpone },
   { "r",  "resolved",         N_("accept current working copy state"),
                               svn_wc_conflict_choose_merged },
-  { "mc", "mine-conflict",    N_("prefer local change"),
-                              svn_wc_conflict_choose_mine_conflict },
-  { "tc", "theirs-conflict",  N_("prefer incoming change"),
-                              svn_wc_conflict_choose_theirs_conflict },
   { "q",  "quit",             N_("postpone all remaining conflicts"),
                               svn_wc_conflict_choose_postpone },
   { "h",  "help",             N_("show this help (also '?')"), -1 },
@@ -396,17 +392,32 @@ static const resolver_option_t tree_conf
 {
   { "p",  "postpone",         N_("resolve the conflict later"),
                               svn_wc_conflict_choose_postpone },
-  { "mc", "mine-conflict",    N_("apply the update to the move destination"),
+  { "mc", "mine-conflict",    N_("apply update to the move destination"),
+                              svn_wc_conflict_choose_mine_conflict },
+  { "r",  "resolved",         N_("mark resolved (the move will become a copy)"),
+                              svn_wc_conflict_choose_merged },
+  { "q",  "quit",             N_("postpone all remaining conflicts"),
+                              svn_wc_conflict_choose_postpone },
+  { "h",  "help",             N_("show this help (also '?')"), -1 },
+  { NULL }
+};
+
+static const resolver_option_t tree_conflict_options_update_deleted[] =
+{
+  { "p",  "postpone",         N_("resolve the conflict later"),
+                              svn_wc_conflict_choose_postpone },
+  { "mc", "mine-conflict",    N_("keep any moves affected by this deletion"),
                               svn_wc_conflict_choose_mine_conflict },
-  { "tc", "theirs-conflict",  N_("break the move, change move destination into "
-                                 "a copy"),
-                              svn_wc_conflict_choose_theirs_conflict },
+  { "r",  "resolved",         N_("mark resolved (any affected moves will "
+                                 "become copies)"),
+                              svn_wc_conflict_choose_merged },
   { "q",  "quit",             N_("postpone all remaining conflicts"),
                               svn_wc_conflict_choose_postpone },
   { "h",  "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 *
@@ -859,10 +870,12 @@ handle_tree_conflict(svn_wc_conflict_res
       svn_pool_clear(iterpool);
 
       if ((desc->operation == svn_wc_operation_update ||
-           desc->operation == svn_wc_operation_switch) &&
-          desc->reason == svn_wc_conflict_reason_moved_away)
+           desc->operation == svn_wc_operation_switch))
         {
-          tc_opts = tree_conflict_options_update_moved_away;
+          if (desc->reason == svn_wc_conflict_reason_moved_away)
+            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
         tc_opts = tree_conflict_options;



Mime
View raw message