subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1766711 - in /subversion/trunk/subversion: libsvn_client/merge.c tests/cmdline/merge_reintegrate_tests.py
Date Wed, 26 Oct 2016 17:45:44 GMT
Author: stsp
Date: Wed Oct 26 17:45:44 2016
New Revision: 1766711

URL: http://svn.apache.org/viewvc?rev=1766711&view=rev
Log:
Avoid accessing a non-existent path while preparing a reintegrate merge.

* subversion/libsvn_client/merge.c
  (find_unsynced_ranges): Reparent the RA session to TARGET_LOC only if
   this location actually exists within the unmerged revision range.
 
* subversion/tests/cmdline/merge_reintegrate_tests.py
  (reintegrate_noop_branch_into_renamed_branch): Remove XFAIL marker.

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

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1766711&r1=1766710&r2=1766711&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Wed Oct 26 17:45:44 2016
@@ -10957,7 +10957,7 @@ find_unsynced_ranges(const svn_client__p
                        potentially_unmerged_ranges->nelts - 1,
                        svn_merge_range_t *))->end;
       log_find_operative_baton_t log_baton;
-      const char *old_session_url;
+      const char *old_session_url = NULL;
       svn_error_t *err;
 
       log_baton.merged_catalog = merged_catalog;
@@ -10968,14 +10968,22 @@ find_unsynced_ranges(const svn_client__p
         = svn_client__pathrev_fspath(target_loc, scratch_pool);
       log_baton.result_pool = result_pool;
 
-      SVN_ERR(svn_client__ensure_ra_session_url(
-                &old_session_url, ra_session, target_loc->url, scratch_pool));
+      /* Reparent the session to TARGET_LOC if this target location
+       * exists within the unmerged revision range. */
+      if (target_loc->rev <= youngest_rev && target_loc->rev >= oldest_rev)
+        SVN_ERR(svn_client__ensure_ra_session_url(
+                  &old_session_url, ra_session, target_loc->url, scratch_pool));
+
       err = get_log(ra_session, "", youngest_rev, oldest_rev,
                     TRUE, /* discover_changed_paths */
                     log_find_operative_revs, &log_baton,
                     scratch_pool);
-      SVN_ERR(svn_error_compose_create(
-                err, svn_ra_reparent(ra_session, old_session_url, scratch_pool)));
+      if (old_session_url)
+        err = svn_error_compose_create(err,
+                                       svn_ra_reparent(ra_session,
+                                                       old_session_url,
+                                                       scratch_pool));
+      SVN_ERR(err);
     }
 
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1766711&r1=1766710&r2=1766711&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_reintegrate_tests.py Wed Oct 26 17:45:44
2016
@@ -2824,7 +2824,6 @@ def renamed_branch_reintegrate(sbox):
   run_reintegrate(sbox.repo_url + '/RENAMED@8', A_path)
 
 @SkipUnless(server_has_mergeinfo)
-@XFail()
 def reintegrate_noop_branch_into_renamed_branch(sbox):
   """reintegrate no-op branch into renamed branch"""
   # In this test, the branch has no unique changes but contains a



Mime
View raw message