subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1580867 - in /subversion/trunk/subversion: libsvn_client/merge.c tests/cmdline/merge_automatic_tests.py
Date Mon, 24 Mar 2014 14:52:13 GMT
Author: julianfoad
Date: Mon Mar 24 14:52:13 2014
New Revision: 1580867

URL: http://svn.apache.org/r1580867
Log:
Fix issue #4481 "automatic merge confused by missing subtree merge".

* subversion/libsvn_client/merge.c
  (find_unsynced_ranges): Fix typo in doc string.
  (find_reintegrate_merge): Pass the correct target path to
    find_unsynced_ranges: don't assume the target path is equal to the
    youngest common ancestor path.

* subversion/tests/cmdline/merge_automatic_tests.py
  (reintegrate_subtree_not_updated): Remove XFail. Tweak the expectations
    and comments.

Modified:
    subversion/trunk/subversion/libsvn_client/merge.c
    subversion/trunk/subversion/tests/cmdline/merge_automatic_tests.py

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1580867&r1=1580866&r2=1580867&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Mon Mar 24 14:52:13 2014
@@ -10783,7 +10783,7 @@ log_find_operative_revs(void *baton,
    UNMERGED_CATALOG represents the history (as mergeinfo) from
    TARGET_LOC that is not represented in SOURCE_LOC's
    explicit/inherited mergeinfo as represented by MERGED_CATALOG.
-   MERGEINFO_CATALOG may be empty if the source has no explicit or inherited
+   MERGED_CATALOG may be empty if the source has no explicit or inherited
    mergeinfo.
 
    Check that all of the unmerged revisions in UNMERGED_CATALOG's
@@ -11486,7 +11486,7 @@ find_reintegrate_merge(merge_source_t **
          prefix. */
       svn_mergeinfo_catalog_t final_unmerged_catalog = apr_hash_make(scratch_pool);
 
-      SVN_ERR(find_unsynced_ranges(source_loc, yc_ancestor,
+      SVN_ERR(find_unsynced_ranges(source_loc, &target->loc,
                                    unmerged_to_source_mergeinfo_catalog,
                                    merged_to_source_mergeinfo_catalog,
                                    final_unmerged_catalog,

Modified: subversion/trunk/subversion/tests/cmdline/merge_automatic_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_automatic_tests.py?rev=1580867&r1=1580866&r2=1580867&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_automatic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_automatic_tests.py Mon Mar 24 14:52:13
2014
@@ -1203,13 +1203,12 @@ def effective_sync_results_in_reintegrat
                                      sbox.repo_url + '/branch', A_path)
 
 @Issue(4481)
-@XFail()
 def reintegrate_subtree_not_updated(sbox):
   "reintegrate subtree not updated"
 
   sbox.build()
 
-  # Create change on branch 'D_1', 
+  # Create change on branch 'D_1'
   sbox.simple_copy('A/D', 'D_1')
   sbox.simple_commit()
   sbox.simple_append('D_1/G/pi', "D_1/G pi edit\n")
@@ -1261,7 +1260,7 @@ def reintegrate_subtree_not_updated(sbox
   sbox.simple_commit()
   sbox.simple_update()
 
-  # Sync merge to 'D_2' doesn't record mergeinfo on 'D_2/H' subtree.
+  # Sync merge to 'D_2' (doesn't record mergeinfo on 'D_2/H' subtree)
   expected_output = [
     "--- Merging r5 through r7 into '"
     + sbox.ospath('D_2') + "':\n",
@@ -1279,15 +1278,6 @@ def reintegrate_subtree_not_updated(sbox
                                      'merge',
                                      sbox.repo_url + '/A/D',
                                      sbox.ospath('D_2'))
-
-  # This extra merge just records mergeinfo on H, but it is enough to make
-  # the final XFAIL merge run, i.e. it resolves the error related to missing
-  # merge on G!
-  # svntest.actions.run_and_verify_svn(None, None, [],
-  #                                   'merge',
-  #                                   sbox.repo_url + '/A/D/H',
-  #                                   sbox.ospath('D_2/H'))
-
   sbox.simple_commit()
   sbox.simple_update()
 
@@ -1312,20 +1302,26 @@ def reintegrate_subtree_not_updated(sbox
   sbox.simple_commit()
   sbox.simple_update()
 
-  # Sync merge to 'D_2' keeping branch going.
-
-  ### XFAIL merge doesn't run, there is a error about missing mergeinfo
-  ###      A/D/G
-  ###        Missing ranges: /A/D/G:7
+return
+  # merge to 'D_2'. This merge previously failed with this error:
+  #
+  # svn: E195016: Reintegrate can only be used if revisions 5 through 9 were
+  # previously merged from [URL]/D_2 to the reintegrate source, but this is
+  # not the case:
+  #   A/D/G
+  #       Missing ranges: /A/D/G:7
+  #
   expected_output = [
-    "--- Merging r7 through r8 into '"
+    "--- Merging differences between repository URLs into '"
     + sbox.ospath('D_2') + "':\n",
     " U   "
-    + sbox.ospath('D_2') + "\n",
-    "--- Recording mergeinfo for merge of r7 through r8 into '"
+    + sbox.ospath('D_2/G') + "\n",
+    "--- Recording mergeinfo for merge between repository URLs into '"
     + sbox.ospath('D_2') + "':\n",
     " U   "
-    + sbox.ospath('D_2') + "\n"]
+    + sbox.ospath('D_2') + "\n",
+    " G   "
+    + sbox.ospath('D_2/G') + "\n"]
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'merge',
                                      sbox.repo_url + '/A/D',



Mime
View raw message