subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1781887 - /subversion/trunk/subversion/libsvn_client/conflicts.c
Date Mon, 06 Feb 2017 12:06:21 GMT
Author: stsp
Date: Mon Feb  6 12:06:21 2017
New Revision: 1781887

URL: http://svn.apache.org/viewvc?rev=1781887&view=rev
Log:
Init working copy move targets in incoming-delete conflict details earlier.

They were initialized when conflict options were requested. If the conflict
description was already requested beforehand, conflict description and
options descriptions ended up showing different move targets.
To fix this problem, init working copy move targets already when conflict
details are first obtained.

* subversion/libsvn_client/conflicts.c
  (init_wc_move_targets): Declare (forward declaration which avoids moving
   some blocks of code around in this commit).
  (conflict_tree_get_details_incoming_delete): Init working copy move targets. 
  (configure_option_incoming_move_file_merge,
   configure_option_incoming_dir_merge): Stop worrying about initialization
    of working copy move targets.


Modified:
    subversion/trunk/subversion/libsvn_client/conflicts.c

Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1781887&r1=1781886&r2=1781887&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Mon Feb  6 12:06:21 2017
@@ -3989,6 +3989,13 @@ get_incoming_delete_details_for_reverse_
   return SVN_NO_ERROR;
 }
 
+/* ### forward declaration */
+static svn_error_t *
+init_wc_move_targets(struct conflict_tree_incoming_delete_details *details,
+                     svn_client_conflict_t *conflict,
+                     svn_client_ctx_t *ctx,
+                     apr_pool_t *scratch_pool);
+
 /* Implements tree_conflict_get_details_func_t.
  * Find the revision in which the victim was deleted in the repository. */
 static svn_error_t *
@@ -4149,6 +4156,9 @@ conflict_tree_get_details_incoming_delet
 
   conflict->tree_conflict_incoming_details = details;
 
+  if (details->moves)
+    SVN_ERR(init_wc_move_targets(details, conflict, ctx, scratch_pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -9183,9 +9193,6 @@ configure_option_incoming_move_file_merg
     {
       const char *description;
 
-      if (details->wc_move_targets == NULL)
-        SVN_ERR(init_wc_move_targets(details, conflict, ctx, scratch_pool));
-
       if (apr_hash_count(details->wc_move_targets) == 0)
         return SVN_NO_ERROR;
 
@@ -9246,9 +9253,6 @@ configure_option_incoming_dir_merge(svn_
     {
       const char *description;
 
-      if (details->wc_move_targets == NULL)
-        SVN_ERR(init_wc_move_targets(details, conflict, ctx, scratch_pool));
-
       if (apr_hash_count(details->wc_move_targets) == 0)
         return SVN_NO_ERROR;
 



Mime
View raw message