You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2013/01/12 05:06:18 UTC

svn commit: r1432376 - /subversion/trunk/subversion/libsvn_ra_serf/replay.c

Author: cmpilato
Date: Sat Jan 12 04:06:18 2013
New Revision: 1432376

URL: http://svn.apache.org/viewvc?rev=1432376&view=rev
Log:
Fix a problem in the ra_serf replay implementation which caused 404
responses to the REPORT requests to go unnoticed.

* subversion/libsvn_ra_serf/replay.c
  (replay_context_t): Add 'report_hander' member.
  (svn_ra_serf__replay, svn_ra_serf__replay_range): Initialize new
    'report_handler' replay context baton member, and use it to check
    for errors (based on status code) in the completed REPORT
    response(s).

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/replay.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/replay.c?rev=1432376&r1=1432375&r2=1432376&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/replay.c Sat Jan 12 04:06:18 2013
@@ -129,8 +129,9 @@ typedef struct replay_context_t {
   /* Keep a reference to the XML parser ctx to report any errors. */
   svn_ra_serf__xml_parser_t *parser_ctx;
 
-  /* The propfind for the revision properties of the current revision */
+  /* Handlers for the PROPFIND and REPORT for the current revision. */
   svn_ra_serf__handler_t *propfind_handler;
+  svn_ra_serf__handler_t *report_handler;
 
 } replay_context_t;
 
@@ -688,12 +689,17 @@ svn_ra_serf__replay(svn_ra_session_t *ra
 
   /* This is only needed to handle errors during XML parsing. */
   replay_ctx->parser_ctx = parser_ctx;
+  replay_ctx->report_handler = handler; /* unused */
 
   svn_ra_serf__request_create(handler);
 
   err = svn_ra_serf__context_run_wait(&replay_ctx->done, session, pool);
 
-  SVN_ERR(err);
+  SVN_ERR(svn_error_compose_create(
+              svn_ra_serf__error_on_status(handler->sline.code,
+                                           handler->path,
+                                           handler->location),
+              err));
 
   return SVN_NO_ERROR;
 }
@@ -875,6 +881,7 @@ svn_ra_serf__replay_range(svn_ra_session
           parser_ctx->done_item = &replay_ctx->done_item;
           handler->response_handler = svn_ra_serf__handle_xml_parser;
           handler->response_baton = parser_ctx;
+          replay_ctx->report_handler = handler;
 
           /* This is only needed to handle errors during XML parsing. */
           replay_ctx->parser_ctx = parser_ctx;
@@ -895,8 +902,12 @@ svn_ra_serf__replay_range(svn_ra_session
       while (done_list)
         {
           replay_context_t *ctx = (replay_context_t *)done_list->data;
+          svn_ra_serf__handler_t *done_handler = ctx->report_handler;
 
           done_list = done_list->next;
+          SVN_ERR(svn_ra_serf__error_on_status(done_handler->sline.code,
+                                               done_handler->path,
+                                               done_handler->location));
           svn_pool_destroy(ctx->src_rev_pool);
           active_reports--;
         }