subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1365324 - /subversion/trunk/subversion/libsvn_client/merge.c
Date Tue, 24 Jul 2012 22:11:14 GMT
Author: julianfoad
Date: Tue Jul 24 22:11:14 2012
New Revision: 1365324

URL: http://svn.apache.org/viewvc?rev=1365324&view=rev
Log:
* subversion/libsvn_client/merge.c
  (find_unsynced_ranges): Don't care where the RA session is parented. This
    will make it easy for the caller to use any session that is open to the
    right repository.

Modified:
    subversion/trunk/subversion/libsvn_client/merge.c

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1365324&r1=1365323&r2=1365324&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Tue Jul 24 22:11:14 2012
@@ -10017,9 +10017,8 @@ log_find_operative_revs(void *baton,
    MERGEINFO_CATALOG may be empty if the source has no explicit or inherited
    mergeinfo.
 
-   Using RA_SESSION, which is pointed at TARGET_LOC, check that all
-   of the unmerged revisions in UNMERGED_CATALOG's mergeinfos are "phantoms",
-   that is, one of the following conditions holds:
+   Check that all of the unmerged revisions in UNMERGED_CATALOG's
+   mergeinfos are "phantoms", that is, one of the following conditions holds:
 
      1) The revision affects no corresponding paths in SOURCE_LOC.
 
@@ -10033,6 +10032,9 @@ log_find_operative_revs(void *baton,
    Note: The keys in all mergeinfo catalogs used here are relative to the
    root of the repository.
 
+   RA_SESSION is an RA session open to the repository of TARGET_LOC; it may
+   be temporarily reparented within this function.
+
    Use SCRATCH_POOL for all temporary allocations. */
 static svn_error_t *
 find_unsynced_ranges(const svn_client__pathrev_t *source_loc,
@@ -10079,6 +10081,10 @@ 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;
+
+      SVN_ERR(svn_client__ensure_ra_session_url(
+                &old_session_url, ra_session, target_loc->url, scratch_pool));
 
       log_baton.merged_catalog = merged_catalog;
       log_baton.unmerged_catalog = true_unmerged_catalog;
@@ -10092,6 +10098,8 @@ find_unsynced_ranges(const svn_client__p
                       TRUE, /* discover_changed_paths */
                       log_find_operative_revs, &log_baton,
                       scratch_pool));
+
+      SVN_ERR(svn_ra_reparent(ra_session, old_session_url, scratch_pool));
     }
 
   return SVN_NO_ERROR;



Mime
View raw message