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

Re: svn commit: r1400545 - /subversion/trunk/subversion/libsvn_ra/ra_loader.c

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Mon, 22 Oct 2012 20:17:59 -0400

On Mon, Oct 22, 2012 at 11:46 AM, Philip Martin
<philip.martin_at_wandisco.com> wrote:
> Hyrum K Wright <hyrum_at_hyrumwright.org> writes:
>
>> On Mon, Oct 22, 2012 at 7:55 AM, Philip Martin
>> <philip.martin_at_wandisco.com> wrote:
>>> hwright_at_apache.org writes:
>>>
>>>> Author: hwright
>>>> Date: Sun Oct 21 01:18:26 2012
>>>> New Revision: 1400545
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1400545&view=rev
>>>> Log:
>>>> Refactor the pre-1.5 fallback code for replay_ranges into a separate function.
>>>>
>>>> * subversion/libsvn_ra/ra_loader.c
>>>> (replay_range_from_replays): New.
>>>> (svn_ra_replay_range): Call the factored out code.
>>>
>>> This causes svnrdump_tests.py 43 and lots of svnsync_tests.py to FAIL
>>> over ra_svn. It looks like an innocuous change, I can't see the error
>>> in the code.
>>
>> Thanks for pointing out the failures. I won't be able to get around
>> to fixing it for (at least) several hours, so feel free to revert in
>> the meantime if it's a large issue.
>
> Worked it out:
>
> svn_error_t *err =
> session->vtable->replay_range(session, start_revision, end_revision,
> low_water_mark, text_deltas,
> revstart_func, revfinish_func,
> replay_baton, pool);
>
> if (err && (err->apr_err != SVN_ERR_RA_NOT_IMPLEMENTED))
> return svn_error_trace(err);
>
> svn_error_clear(err);
> return svn_error_trace(replay_range_from_replays(session, start_revision,
> end_revision,
> low_water_mark,
> text_deltas,
> revstart_func,
> revfinish_func,
> replay_baton, pool));
>
> When the vtable call returns SVN_NO_ERROR the code should return but
> instead goes on to call replay_range_from_replays.

Thanks. I generally like to use the early-return rather than
big-if-statement construction as I think it highlights readability,
but not if I sacrifice correctness to get there! Thanks for fixing.

-Hyrum
Received on 2012-10-23 02:18:34 CEST

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.