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

Re: ra_dav mass-commit status

From: <kfogel_at_collab.net>
Date: 2001-08-27 19:00:13 CEST

cmpilato@collab.net writes:
> Hey, Greg, check how svn_txdelta_parse_svndiff() is used in
> libsvn_fs/reps-strings.c:rep_read_range(). I'm trapping that specific
> error and ignoring it because I'm sending data in chunks, and I *know*
> there are times when I won't be sending the whole of the svndiff
> data. I'm not sure that mod_dav_svn is doing anything special when
> the stream is closed -- would that be dav_svn_close_stream()?
>
> Now, I don't know which is better: to catch this specific error (it is
> generated in exactly one place in the code), or to change the
> close_handler for svndiff stuffs so that it stops caring about the
> fact that the data ended early. I do think it's good to have that
> final integrity check there, but if it is going to complicate the code
> in other ways, I'm not so sure.

Mike and I just discussed this some more, here's a summary of our
thought:

We're bound to lose if every caller of close_stream(svndiff_stream)
needs to check for and optionally ignore this error. Someone will
always forget to do it. I know that someone will be me at least
once. :-)

Instead, let's add a flag to open_stream(svndiff_stream). The flag
will signify whether close_stream() should error on pending data or
just ignore it. That way, callers will be forced by the function
prototype itself to make a choice when creating the stream. This is
much less human-error prone than the current way.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:37 2006

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.