Author: stsp
Date: Fri Nov 25 12:50:38 2011
New Revision: 1206144

URL: http://svn.apache.org/viewvc?rev=1206144&view=rev
Log:
On the moves-scan-log branch, only show moves if the user actually chose 'f'.

* subversion/svn/conflict-callbacks.c
  (svn_cl__conflict_baton_t, svn_cl__conflict_baton_make): Add 'show_moves'.
  (svn_cl__conflict_handler): Set show_moves in baton to TRUE if the user
   chose find-move. Unset it again when moves were shown so that we don't
   keep showing moves in case the user picks other options (such as 'h')
   which cause the prompt to re-appear.

Modified:
    subversion/branches/moves-scan-log/subversion/svn/cl.h
    subversion/branches/moves-scan-log/subversion/svn/conflict-callbacks.c

Modified: subversion/branches/moves-scan-log/subversion/svn/cl.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/svn/cl.h?rev=1206144&r1=1206143&r2=1206144&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/svn/cl.h (original)
+++ subversion/branches/moves-scan-log/subversion/svn/cl.h Fri Nov 25 12:50:38 
2011
@@ -330,6 +330,7 @@ typedef struct svn_cl__conflict_baton_t 
   svn_boolean_t external_failed;
   svn_cmdline_prompt_baton_t *pb;
   const char *path_prefix;
+  svn_boolean_t show_moves;
 } svn_cl__conflict_baton_t;
 
 /* Create and return a conflict baton in *B, allocated from POOL, with the

Modified: subversion/branches/moves-scan-log/subversion/svn/conflict-callbacks.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/svn/conflict-callbacks.c?rev=1206144&r1=1206143&r2=1206144&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/svn/conflict-callbacks.c 
(original)
+++ subversion/branches/moves-scan-log/subversion/svn/conflict-callbacks.c Fri 
Nov 25 12:50:38 2011
@@ -57,6 +57,7 @@ svn_cl__conflict_baton_make(svn_cl__conf
   (*b)->external_failed = FALSE;
   (*b)->pb = pb;
   SVN_ERR(svn_dirent_get_absolute(&(*b)->path_prefix, "", pool));
+  (*b)->show_moves = FALSE;
   return SVN_NO_ERROR;
 }
 
@@ -920,8 +921,9 @@ svn_cl__conflict_handler(svn_wc_conflict
         {
           svn_pool_clear(subpool);
 
-          if (desc->suggested_moves)
+          if (desc->suggested_moves && b->show_moves)
             {
+              b->show_moves = FALSE;
               if (desc->suggested_moves->nelts == 0)
                 {
                   SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
@@ -973,9 +975,12 @@ svn_cl__conflict_handler(svn_wc_conflict
 
           if (strcmp(answer, "f") == 0)
             {
+              b->show_moves = TRUE;
               if (desc->suggested_moves)
                 continue;
 
+              /* No suggested moves information yet, need to ask the library
+               * to scan the revision log for moves. */
               (*result)->choice = svn_wc_conflict_choose_scan_log_for_moves;
               break;
             }


Reply via email to