You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2013/02/19 01:55:05 UTC

svn commit: r1447564 - /subversion/trunk/subversion/svn/conflict-callbacks.c

Author: julianfoad
Date: Tue Feb 19 00:55:03 2013
New Revision: 1447564

URL: http://svn.apache.org/r1447564
Log:
Fix the interactive conflict resolver 'q' option -- it wasn't quitting.

Found by: markphip

* subversion/svn/conflict-callbacks.c
  (svn_cl__interactive_conflict_baton_t): Add a 'quit' flag.
  (handle_text_conflict,
   handle_prop_conflict,
   handle_tree_conflict,
   handle_obstructed_add): Set the 'quit' flag as well as setting the
    baton's accept_which to 'postpone'.
  (svn_cl__resolve_postponed_conflicts): If the 'quit' flag is set after
    resolving conflicts on a given path, then don't process any more paths.

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=1447564&r1=1447563&r2=1447564&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Tue Feb 19 00:55:03 2013
@@ -52,6 +52,7 @@ struct svn_cl__interactive_conflict_bato
   svn_boolean_t external_failed;
   svn_cmdline_prompt_baton_t *pb;
   const char *path_prefix;
+  svn_boolean_t quit;
 };
 
 svn_error_t *
@@ -75,6 +76,7 @@ svn_cl__get_conflict_func_interactive_ba
   (*b)->external_failed = FALSE;
   (*b)->pb = pb;
   SVN_ERR(svn_dirent_get_absolute(&(*b)->path_prefix, "", result_pool));
+  (*b)->quit = FALSE;
 
   return SVN_NO_ERROR;
 }
@@ -603,6 +605,7 @@ handle_text_conflict(svn_wc_conflict_res
         {
           result->choice = opt->choice;
           b->accept_which = svn_cl__accept_postpone;
+          b->quit = TRUE;
           break;
         }
       else if (strcmp(opt->code, "s") == 0)
@@ -798,6 +801,7 @@ handle_prop_conflict(svn_wc_conflict_res
         {
           result->choice = opt->choice;
           b->accept_which = svn_cl__accept_postpone;
+          b->quit = TRUE;
           break;
         }
       else if (opt->choice != -1)
@@ -859,6 +863,7 @@ handle_tree_conflict(svn_wc_conflict_res
         {
           result->choice = opt->choice;
           b->accept_which = svn_cl__accept_postpone;
+          b->quit = TRUE;
           break;
         }
       else if (opt->choice != -1)
@@ -908,6 +913,7 @@ handle_obstructed_add(svn_wc_conflict_re
         {
           result->choice = opt->choice;
           b->accept_which = svn_cl__accept_postpone;
+          b->quit = TRUE;
           break;
         }
       else if (opt->choice != -1)
@@ -1226,6 +1232,9 @@ svn_cl__resolve_postponed_conflicts(svn_
           if (text_c || prop_c || tree_c)
             *conflicts_all_resolved = FALSE;
         }
+
+      if (b->quit)
+        break;
     }
   svn_pool_destroy(iterpool);