[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Improve error handling in svn_ra_serf__replay_range()

From: vijay <vijay_at_collab.net>
Date: Tue, 18 Dec 2012 17:34:59 +0530

On Monday 17 December 2012 09:34 PM, Philip Martin wrote:
> vijay <vijay_at_collab.net> writes:
>
>> 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.
>
> Consider adding a regression test to svnrdump_tests.py.

Done. The patch and log message are updated.

>
>> /* 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));
>> +
>
> When I see this sort of change I wonder if it needs to be applied
> anywhere else. The call in update.c:svn_ra_serf__get_file also uses
> SVN_ERR. Does it need the same fix?
>

For the above function svn_ra_serf__get_file(), 404 kind of errors will
be handled in svn_ra_serf__fetch_node_props ->
svn_ra_serf__retrieve_props -> svn_ra_serf__wait_for_props.

There are few more places where I see the comment "### use
svn_ra_serf__error_on_status() ? ". If the errors are not being handled
and if we can trigger it using some command, We will fix it. Your thoughts?

Thanks & Regards,
vijayaguru

Received on 2012-12-18 13:05:41 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.