You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2013/07/16 06:00:16 UTC

svn commit: r1503554 - in /subversion/branches/1.8.x: ./ STATUS subversion/libsvn_ra_svn/client.c

Author: svn-role
Date: Tue Jul 16 04:00:16 2013
New Revision: 1503554

URL: http://svn.apache.org/r1503554
Log:
Merge the r1502909 group from trunk:

 * r1502909, r1502952
   Make ra_svn sessions reusable after a log callback uses the
   SVN_ERR_CEASE_INVOCATION error.
   Justification:
     Without this patch a new session would be required for each of these
     usages.
     Required by the r1468980 group.
   Notes:
     Reads the remaining data before returning, but avoids processing
     the data where possible.
   Votes:
     +1: rhuijben, danielsh, stefan2

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/libsvn_ra_svn/client.c

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1502909,1502952

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1503554&r1=1503553&r2=1503554&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Tue Jul 16 04:00:16 2013
@@ -202,19 +202,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1502909, r1502952
-   Make ra_svn sessions reusable after a log callback uses the
-   SVN_ERR_CEASE_INVOCATION error.
-   Justification:
-     Without this patch a new session would be required for each of these
-     usages.
-     Required by the r1468980 group.
-   Notes:
-     Reads the remaining data before returning, but avoids processing
-     the data where possible.
-   Votes:
-     +1: rhuijben, danielsh, stefan2
-
  * r1503009
    Short-circuit the UTF-8 conversion when the source encoding is UTF-8.
    Justification:

Modified: subversion/branches/1.8.x/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_ra_svn/client.c?rev=1503554&r1=1503553&r2=1503554&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_ra_svn/client.c Tue Jul 16 04:00:16 2013
@@ -1478,16 +1478,19 @@ static svn_error_t *ra_svn_diff(svn_ra_s
 }
 
 
-static svn_error_t *ra_svn_log(svn_ra_session_t *session,
-                               const apr_array_header_t *paths,
-                               svn_revnum_t start, svn_revnum_t end,
-                               int limit,
-                               svn_boolean_t discover_changed_paths,
-                               svn_boolean_t strict_node_history,
-                               svn_boolean_t include_merged_revisions,
-                               const apr_array_header_t *revprops,
-                               svn_log_entry_receiver_t receiver,
-                               void *receiver_baton, apr_pool_t *pool)
+static svn_error_t *
+perform_ra_svn_log(svn_error_t **outer_error,
+                   svn_ra_session_t *session,
+                   const apr_array_header_t *paths,
+                   svn_revnum_t start, svn_revnum_t end,
+                   int limit,
+                   svn_boolean_t discover_changed_paths,
+                   svn_boolean_t strict_node_history,
+                   svn_boolean_t include_merged_revisions,
+                   const apr_array_header_t *revprops,
+                   svn_log_entry_receiver_t receiver,
+                   void *receiver_baton,
+                   apr_pool_t *pool)
 {
   svn_ra_svn__session_baton_t *sess_baton = session->priv;
   svn_ra_svn_conn_t *conn = sess_baton->conn;
@@ -1628,8 +1631,10 @@ static svn_error_t *ra_svn_log(svn_ra_se
         cphash = NULL;
 
       nreceived = 0;
-      if (! (limit && (nest_level == 0) && (++nreceived > limit)))
+      if (! (limit && (nest_level == 0) && (++nreceived > limit))
+          && ! *outer_error)
         {
+          svn_error_t *err;
           log_entry = svn_log_entry_create(iterpool);
 
           log_entry->changed_paths = cphash;
@@ -1672,7 +1677,15 @@ static svn_error_t *ra_svn_log(svn_ra_se
                                   SVN_PROP_REVISION_LOG, message);
                 }
             }
-          SVN_ERR(receiver(receiver_baton, log_entry, iterpool));
+          err = receiver(receiver_baton, log_entry, iterpool);
+          if (err && err->apr_err == SVN_ERR_CEASE_INVOCATION)
+            {
+              *outer_error = svn_error_trace(
+                                svn_error_compose_create(*outer_error, err));
+            }
+          else
+            SVN_ERR(err);
+
           if (log_entry->has_children)
             {
               nest_level++;
@@ -1687,9 +1700,40 @@ static svn_error_t *ra_svn_log(svn_ra_se
   svn_pool_destroy(iterpool);
 
   /* Read the response. */
-  return svn_ra_svn__read_cmd_response(conn, pool, "");
+  return svn_error_trace(svn_ra_svn__read_cmd_response(conn, pool, ""));
 }
 
+static svn_error_t *
+ra_svn_log(svn_ra_session_t *session,
+           const apr_array_header_t *paths,
+           svn_revnum_t start, svn_revnum_t end,
+           int limit,
+           svn_boolean_t discover_changed_paths,
+           svn_boolean_t strict_node_history,
+           svn_boolean_t include_merged_revisions,
+           const apr_array_header_t *revprops,
+           svn_log_entry_receiver_t receiver,
+           void *receiver_baton, apr_pool_t *pool)
+{
+  svn_error_t *outer_error = NULL;
+  svn_error_t *err;
+
+  err = svn_error_trace(perform_ra_svn_log(&outer_error,
+                                           session, paths,
+                                           start, end,
+                                           limit,
+                                           discover_changed_paths,
+                                           strict_node_history,
+                                           include_merged_revisions,
+                                           revprops,
+                                           receiver, receiver_baton,
+                                           pool));
+  return svn_error_trace(
+            svn_error_compose_create(outer_error,
+                                     err));
+}
+
+
 
 static svn_error_t *ra_svn_check_path(svn_ra_session_t *session,
                                       const char *path, svn_revnum_t rev,