Hi,
I was looking at the issue #4100: "svnrdump dump -rN:M
<URL-deleted-in-HEAD>' fails" [1].
<issue-snip>
[[[
$
URL=http://svn.apache.org/repos/asf/subversion/trunk/contrib/server-side/mod_setlocale
$ svnrdump dump $URL -r1232154 > /dev/null
* Dumped revision 1232154.
$ svnrdump dump $URL -r1232155 > /dev/null
* Dumped revision 1232155.
$ svnrdump dump $URL -r1232154:1232155 > /dev/null
* Dumped revision 1232154.
subversion/svnrdump/svnrdump.c:433: (apr_err=160013)
subversion/libsvn_ra/ra_loader.c:1184: (apr_err=160013)
subversion/libsvn_ra_neon/util.c:1323: (apr_err=160013)
subversion/libsvn_ra_neon/util.c:596: (apr_err=160013)
svnrdump: E160013:
'http://svn.apache.org/repos/asf/subversion/trunk/contrib/server-side/mod_setlocale'
path not found
]]]
</issue-snip>
I could see the error "path not found" with ra_neon but ra_serf doesn't
return any error whereas it should.
This patch will fix this issue by handling the errors while processing
connections defined in serf context.
Attached the patch and log message.
[1] http://subversion.tigris.org/issues/show_bug.cgi?id=4100
Thanks & Regards,
Vijayaguru
Improve error handling during a 'replay' using Serf.
The function svn_ra_serf__replay_range() doesn't return any error
while running 'svnrdump dump -rN:M <URL-deleted-in-HEAD>'[Issue #4100].
It behaves as if the dump completed successfully.
* subversion/libsvn_ra_serf/replay.c
(svn_ra_serf__replay_range): Handle the errors from server's response as
well as any errors found while running the serf loop.
Patch by: Vijayaguru G <vijay{_AT_}collab.net>
Index: subversion/libsvn_ra_serf/replay.c
===================================================================
--- subversion/libsvn_ra_serf/replay.c (revision 1422748)
+++ subversion/libsvn_ra_serf/replay.c (working copy)
@@ -740,6 +740,8 @@
svn_ra_serf__list_t *done_list;
svn_ra_serf__list_t *done_reports = NULL;
replay_context_t *replay_ctx;
+ svn_ra_serf__handler_t *handler;
+ svn_error_t *err;
if (session->cancel_func)
SVN_ERR(session->cancel_func(session->cancel_baton));
@@ -748,7 +750,6 @@
requests to MAX_OUTSTANDING_REQUESTS. */
if (rev <= end_revision && active_reports < MAX_OUTSTANDING_REQUESTS)
{
- svn_ra_serf__handler_t *handler;
svn_ra_serf__xml_parser_t *parser_ctx;
apr_pool_t *ctx_pool = svn_pool_create(pool);
@@ -832,8 +833,16 @@
}
/* Run the serf loop. */
- SVN_ERR(svn_ra_serf__context_run_wait(&replay_ctx->done, session, pool));
+ err = svn_ra_serf__context_run_wait(&replay_ctx->done, session, pool);
+ /* Handle the errors from server's response as well as any errors
+ found while running the serf loop. */
+ SVN_ERR(svn_error_compose_create(
+ svn_ra_serf__error_on_status(handler->sline.code,
+ handler->path,
+ handler->location),
+ err));
+
/* Substract the number of completely handled responses from our
total nr. of open requests', so we'll know when to stop this loop.
Since the message is completely handled, we can destroy its pool. */