subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1853450 - /subversion/trunk/subversion/libsvn_client/conflicts.c
Date Tue, 12 Feb 2019 16:02:32 GMT
Author: stsp
Date: Tue Feb 12 16:02:32 2019
New Revision: 1853450

URL: http://svn.apache.org/viewvc?rev=1853450&view=rev
Log:
Only enable the 'incoming_move_file_merge' resolution option if the
local change is a file edit.

This resolution option was introduced in r1747727 and accidentally enabled
for any local change vs an incoming deletion. So while this resolution
handler only supports local edits, it was enabled even for other conflicts,
such as those involving locally moved-away files.
In that case Subversion was pretending to resolve the conflict when in fact
it did not resolve it. The resolution handler in libsvn_client internally
failed with a "path not found" error which was masked by 'svn resolve' (since
this error is sometimes legitimate) and the conflict marker was still in
place after Subversion proudly proclaimed:
"Applying recommended resolution 'Move and merge'"

Subversion now tells the truth instead:
"Subversion is not smart enough to resolve this tree conflict automatically!"

* subversion/libsvn_client/conflicts.c
  (configure_option_incoming_move_file_merge): Only configure this option if
   the local change is an 'edit'.

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=1853450&r1=1853449&r2=1853450&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Tue Feb 12 16:02:32 2019
@@ -10773,6 +10773,7 @@ configure_option_incoming_move_file_merg
 {
   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;
@@ -10781,6 +10782,7 @@ configure_option_incoming_move_file_merg
   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,
@@ -10794,7 +10796,8 @@ configure_option_incoming_move_file_merg
   if (victim_node_kind == svn_node_file &&
       incoming_old_kind == svn_node_file &&
       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;



Mime
View raw message