subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1841861 - in /subversion/branches/1.11.x: ./ STATUS subversion/libsvn_client/conflicts.c subversion/tests/cmdline/tree_conflict_tests.py
Date Mon, 24 Sep 2018 14:41:58 GMT
Author: julianfoad
Date: Mon Sep 24 14:41:58 2018
New Revision: 1841861

URL: http://svn.apache.org/viewvc?rev=1841861&view=rev
Log:
Merge the r1841731 group from trunk:

 * r1841731, r1841736, r1841743
   Fix endless loop in the conflict resolver.
   Justification:
     'local missing' conflicts with directories can trigger an endless loop.
   Notes:
     r1841731 is the actual fix and test
     r1841736 is a follow-up fix to make the test pass on Windows
     r1841743 is a follow-up fix for the follow-up fix :)
   Votes:
     +1: stsp, jcorvel, brane

Modified:
    subversion/branches/1.11.x/   (props changed)
    subversion/branches/1.11.x/STATUS
    subversion/branches/1.11.x/subversion/libsvn_client/conflicts.c
    subversion/branches/1.11.x/subversion/tests/cmdline/tree_conflict_tests.py

Propchange: subversion/branches/1.11.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 24 14:41:58 2018
@@ -100,4 +100,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1840990-1840991,1840995,1840997,1841059,1841091,1841098,1841136,1841180,1841272,1841524-1841525,1841600-1841602,1841606
+/subversion/trunk:1840990-1840991,1840995,1840997,1841059,1841091,1841098,1841136,1841180,1841272,1841524-1841525,1841600-1841602,1841606,1841731,1841736,1841743

Modified: subversion/branches/1.11.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.11.x/STATUS?rev=1841861&r1=1841860&r2=1841861&view=diff
==============================================================================
--- subversion/branches/1.11.x/STATUS (original)
+++ subversion/branches/1.11.x/STATUS Mon Sep 24 14:41:58 2018
@@ -37,17 +37,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1841731, r1841736, r1841743
-   Fix endless loop in the conflict resolver.
-   Justification:
-     'local missing' conflicts with directories can trigger an endless loop.
-   Notes:
-     r1841731 is the actual fix and test
-     r1841736 is a follow-up fix to make the test pass on Windows
-     r1841743 is a follow-up fix for the follow-up fix :)
-   Votes:
-     +1: stsp, jcorvel, brane
-
  * r1841822
    Shelving: update the command-line help about the storage directory and say
    how to recover a 1.10 shelf.

Modified: subversion/branches/1.11.x/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.11.x/subversion/libsvn_client/conflicts.c?rev=1841861&r1=1841860&r2=1841861&view=diff
==============================================================================
--- subversion/branches/1.11.x/subversion/libsvn_client/conflicts.c (original)
+++ subversion/branches/1.11.x/subversion/libsvn_client/conflicts.c Mon Sep 24 14:41:58 2018
@@ -10565,7 +10565,8 @@ svn_client_conflict_option_get_moved_to_
       struct conflict_tree_local_missing_details *details;
 
       details = conflict->tree_conflict_local_details;
-      if (details == NULL || details->wc_move_targets == NULL)
+      if (details == NULL ||
+          (details->wc_move_targets == NULL && details->wc_siblings == NULL))
         return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
                                  _("Getting a list of possible move targets "
                                    "requires details for tree conflict at '%s' "
@@ -10573,9 +10574,12 @@ svn_client_conflict_option_get_moved_to_
                                 svn_dirent_local_style(victim_abspath,
                                                        scratch_pool));
 
-      SVN_ERR(get_repos_relpath_candidates(possible_moved_to_repos_relpaths,
-                                           details->wc_move_targets,
-                                           result_pool, scratch_pool));
+      if (details->wc_move_targets)
+        SVN_ERR(get_repos_relpath_candidates(possible_moved_to_repos_relpaths,
+                                             details->wc_move_targets,
+                                             result_pool, scratch_pool));
+      else
+        *possible_moved_to_repos_relpaths = NULL;
     }
   else
     {

Modified: subversion/branches/1.11.x/subversion/tests/cmdline/tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.11.x/subversion/tests/cmdline/tree_conflict_tests.py?rev=1841861&r1=1841860&r2=1841861&view=diff
==============================================================================
--- subversion/branches/1.11.x/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/branches/1.11.x/subversion/tests/cmdline/tree_conflict_tests.py Mon Sep 24
14:41:58 2018
@@ -1506,6 +1506,47 @@ def update_delete_mixed_rev(sbox):
   }
   run_and_verify_info([expected_info], sbox.repo_url + '/A/B/E/alpha2')
 
+# NB: This test will run forever if the bug it is testing for is present!
+def local_missing_dir_endless_loop(sbox):
+  "endless loop when resolving local-missing dir"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  sbox.simple_copy('A', 'A1')
+  sbox.simple_commit()
+  sbox.simple_update()
+  sbox.simple_move('A/B', 'A/B2')
+  sbox.simple_commit()
+  sbox.simple_update()
+  main.file_append_binary(sbox.ospath("A/B2/lambda"), "This is more content.\n")
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # Create a config which enables the interactive conflict resolver
+  config_contents = '''\
+[auth]
+password-stores =
+
+[miscellany]
+interactive-conflicts = true
+'''
+  config_dir = sbox.create_config_dir(config_contents)
+
+  # Bug: 'svn' keeps retrying interactive conflict resolution while the library
+  # keeps signalling 'SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE' -> endless loop
+  main.run_svn("Tree conflict on '%s'" % sbox.ospath("A1/B2"),
+      'merge', '-c4', '^/A', sbox.ospath('A1'),
+      '--config-dir', config_dir, '--force-interactive')
+
+  # If everything works as expected the resolver will recommended a
+  # resolution option and 'svn' will resolve the conflict automatically.
+  # Verify that 'A1/B/lambda' contains the merged content:
+  contents = open(sbox.ospath('A1/B/lambda'), 'rb').readlines()
+  svntest.verify.compare_and_display_lines(
+    "A1/B/lambda has unexpectected contents", sbox.ospath("A1/B/lambda"),
+    [ "This is the file 'lambda'.\n", "This is more content.\n"], contents)
+
+
 #######################################################################
 # Run the tests
 
@@ -1537,6 +1578,7 @@ test_list = [ None,
               actual_only_node_behaviour,
               update_dir_with_not_present,
               update_delete_mixed_rev,
+              local_missing_dir_endless_loop,
              ]
 
 if __name__ == '__main__':



Mime
View raw message