On Mon, Oct 22, 2012 at 11:46 AM, Philip Martin <philip.mar...@wandisco.com> wrote: > Hyrum K Wright <hy...@hyrumwright.org> writes: > >> On Mon, Oct 22, 2012 at 7:55 AM, Philip Martin >> <philip.mar...@wandisco.com> wrote: >>> hwri...@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