subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1825711 - in /subversion/trunk/subversion: libsvn_client/conflicts.c tests/libsvn_client/conflicts-test.c
Date Fri, 02 Mar 2018 11:48:32 GMT
Author: stsp
Date: Fri Mar  2 11:48:32 2018
New Revision: 1825711

URL: http://svn.apache.org/viewvc?rev=1825711&view=rev
Log:
Offer 'move and merge' resolution option for directories only when supported.

The function resolve_incoming_move_dir_merge() currently only supports
situations where the local change is an 'edit'. Do not offer this option
in other cases, such as when a 'move vs move' conflict occurs on a directory.

* subversion/libsvn_client/conflicts.c
  (configure_option_incoming_dir_merge): Only match on 'local edit'.

* subversion/tests/libsvn_client/conflicts-test.c
  (test_merge_incoming_move_dir_across_branches): Assert that the local
   change is an 'edit', as is expected.

Modified:
    subversion/trunk/subversion/libsvn_client/conflicts.c
    subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c

Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1825711&r1=1825710&r2=1825711&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Fri Mar  2 11:48:32 2018
@@ -9899,6 +9899,7 @@ configure_option_incoming_dir_merge(svn_
 {
   svn_node_kind_t victim_node_kind;
   svn_wc_conflict_action_t incoming_change;
+  svn_wc_conflict_reason_t local_change;
   const char *incoming_old_repos_relpath;
   svn_revnum_t incoming_old_pegrev;
   svn_node_kind_t incoming_old_kind;
@@ -9907,6 +9908,7 @@ configure_option_incoming_dir_merge(svn_
   svn_node_kind_t incoming_new_kind;
 
   incoming_change = svn_client_conflict_get_incoming_change(conflict);
+  local_change = svn_client_conflict_get_local_change(conflict);
   victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict);
   SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
             &incoming_old_repos_relpath, &incoming_old_pegrev,
@@ -9920,7 +9922,8 @@ configure_option_incoming_dir_merge(svn_
   if (victim_node_kind == svn_node_dir &&
       incoming_old_kind == svn_node_dir &&
       incoming_new_kind == svn_node_none &&
-      incoming_change == svn_wc_conflict_action_delete)
+      incoming_change == svn_wc_conflict_action_delete &&
+      local_change == svn_wc_conflict_reason_edited)
     {
       struct conflict_tree_incoming_delete_details *details;
       const char *description;

Modified: subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c?rev=1825711&r1=1825710&r2=1825711&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c Fri Mar  2 11:48:32 2018
@@ -5093,6 +5093,9 @@ test_merge_incoming_move_dir_across_bran
                                   ctx, b->pool, b->pool));
   SVN_ERR(svn_client_conflict_tree_get_details(conflict, ctx, b->pool));
 
+  SVN_ERR_ASSERT(svn_client_conflict_get_local_change(conflict) ==
+                 svn_wc_conflict_reason_edited);
+
   /* Check possible move destinations for the directory. */
   SVN_ERR(svn_client_conflict_tree_get_resolution_options(&options, conflict,
                                                           ctx, b->pool,



Mime
View raw message