subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1657654 - /subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c
Date Thu, 05 Feb 2015 18:20:58 GMT
Author: ivan
Date: Thu Feb  5 18:20:57 2015
New Revision: 1657654

URL: http://svn.apache.org/r1657654
Log:
On the reuse-ra-session branch: Release unused RA session.

* subversion/libsvn_client/merge.c
  (do_merge): Use directly svn_client_open_ra_session2() to open RA session
   instead of ensure_ra_session_url() since provide NULL as existing RA
   session. Release this RA session once we finished using it.

Modified:
    subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c?rev=1657654&r1=1657653&r2=1657654&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c Thu Feb  5 18:20:57
2015
@@ -12735,12 +12735,13 @@ do_automatic_merge_locked(conflict_repor
          find the base for each sutree, and then here use the oldest base
          among all subtrees. */
       apr_array_header_t *merge_sources;
-      svn_ra_session_t *ra_session = NULL;
+      svn_ra_session_t *ra_session;
 
       /* Normalize our merge sources, do_merge() requires this.  See the
          'MERGEINFO MERGE SOURCE NORMALIZATION' global comment. */
-      SVN_ERR(ensure_ra_session_url(&ra_session, merge->right->url,
-                                    target->abspath, ctx, scratch_pool));
+      SVN_ERR(svn_client_open_ra_session2(&ra_session, merge->right->url,
+                                          target->abspath, ctx, scratch_pool,
+                                          scratch_pool));
       SVN_ERR(normalize_merge_sources_internal(
         &merge_sources, merge->right,
         svn_rangelist__initialize(merge->yca->rev, merge->right->rev, TRUE,
@@ -12754,6 +12755,8 @@ do_automatic_merge_locked(conflict_repor
                      force_delete, dry_run,
                      record_only, NULL, FALSE, FALSE, depth, merge_options,
                      ctx, result_pool, scratch_pool);
+      if (!err)
+        SVN_ERR(svn_client__ra_session_release(ctx, ra_session));
     }
 
   if (use_sleep)



Mime
View raw message