You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2018/09/23 13:36:47 UTC

svn commit: r1841754 - in /subversion/trunk/subversion: libsvn_client/conflicts.c tests/libsvn_client/conflicts-test.c

Author: stsp
Date: Sun Sep 23 13:36:47 2018
New Revision: 1841754

URL: http://svn.apache.org/viewvc?rev=1841754&view=rev
Log:
Fix an assertion failure in the conflict resolver.

* subversion/libsvn_client/conflicts.c
  (conflict_tree_get_details_local_missing): We do not yet support the case
   where the parent directory of the conflict victim is not part of the
   repository-side tree which is checked out. Do not try to figure out
   conflict details in this case yet.

* subversion/tests/libsvn_client/conflicts-test.c
  (test_file_vs_dir_move_merge_assertion_failure): Remove code under #if 0
   which I committed by accident in r1841753. Align test expectations with
   the current behaviour of the conflict resolver.
  (test_funcs): Mark test_file_vs_dir_move_merge_assertion_failure as PASS.

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=1841754&r1=1841753&r2=1841754&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Sun Sep 23 13:36:47 2018
@@ -2836,6 +2836,11 @@ conflict_tree_get_details_local_missing(
                                       scratch_pool,
                                       scratch_pool));
 
+  /* If the parent is not part of the repository-side tree checked out
+   * into this working copy, then bail. We do not support this case yet. */
+  if (parent_peg_rev == SVN_INVALID_REVNUM)
+    return SVN_NO_ERROR;
+
   /* Pick the younger incoming node as our 'related node' which helps
    * pin-pointing the deleted conflict victim in history. */
   related_repos_relpath = 

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=1841754&r1=1841753&r2=1841754&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_client/conflicts-test.c Sun Sep 23 13:36:47 2018
@@ -6068,13 +6068,6 @@ test_file_vs_dir_move_merge_assertion_fa
   svn_client_conflict_t *conflict;
   apr_array_header_t *options;
   svn_client_conflict_option_t *option;
-  #if 0
-  apr_array_header_t *possible_moved_to_repos_relpaths;
-  apr_array_header_t *possible_moved_to_abspaths;
-  struct status_baton sb;
-  struct svn_client_status_t *status;
-  svn_stringbuf_t *buf;
-#endif
   const char *wc_path;
 
   SVN_ERR(svn_test__sandbox_create(b,
@@ -6177,7 +6170,7 @@ test_file_vs_dir_move_merge_assertion_fa
                                          b->pool));
   }
 
-  /* BUG: This triggers an assertion failure:
+  /* This used to trigger an assertion failure:
    * svn_tests: E235000: In file 'subversion/libsvn_client/conflicts.c' \
    *    line 2242: assertion failed (start_rev > end_rev) */
   SVN_ERR(svn_client_conflict_tree_get_details(conflict, ctx, b->pool));
@@ -6185,13 +6178,14 @@ test_file_vs_dir_move_merge_assertion_fa
     svn_client_conflict_option_id_t expected_opts[] = {
       svn_client_conflict_option_postpone,
       svn_client_conflict_option_accept_current_wc_state,
-      svn_client_conflict_option_incoming_move_dir_merge,
       -1 /* end of list */
     };
     SVN_ERR(assert_tree_conflict_options(conflict, ctx, expected_opts,
                                          b->pool));
   }
 
+  /* Subversion is not yet smart enough to resolve this tree conflict. */
+
   return SVN_NO_ERROR;
 }
 
@@ -6297,7 +6291,7 @@ static struct svn_test_descriptor_t test
                        "local missing conflict with ambiguous moves"),
     SVN_TEST_OPTS_PASS(test_local_missing_abiguous_moves_dir,
                        "local missing conflict with ambiguous dir moves"),
-    SVN_TEST_OPTS_XFAIL(test_file_vs_dir_move_merge_assertion_failure,
+    SVN_TEST_OPTS_PASS(test_file_vs_dir_move_merge_assertion_failure,
                        "file v dir move merge assertion failure"),
     SVN_TEST_NULL
   };