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

Re: [PATCH] fix progress callback for ra_svn

From: Stefan Sperling <stsp_at_elego.de>
Date: Sat, 2 Aug 2008 10:45:26 +0200

On Sat, Aug 02, 2008 at 09:40:17AM +0200, Stefan Küng wrote:
> Hi,
>
> Some users reported that TSVN shows unbelievable amounts of bytes
> transferred for all operations, but only when used with svn://.
>
> I've tried ra_serf and ra_neon, those work ok. But ra_svn passes the sum
> of bytes transferred to the progress callback, while neon and serf pass
> only the bytes just transferred to the callback (they don't sum up the
> transferred bytes).
>
> I'd like to have all three layers call the progress callback the same
> way. Since adjusting ra_neon to do the same as ra_svn does would require
> a change in the neon library, I think it's best to change ra_svn (also,
> the callback was inspired by the neon progress callback, so I'd say that
> it's ra_svn which does it wrong).
>
> the attached patch fixes this.

The API docs for svn_ra_progress_notify_func_t do not say
whether the callback should pass the sum of bytes transferred
so far, or just the amount of bytes transferred since the last
time the callback was called:

/**
 * Callback function type for progress notification.
 *
 * @a progress is the number of bytes already transferred, @a total is
 * the total number of bytes to transfer or -1 if it's not known, @a
 * baton is the callback baton.
 *
 * @since New in 1.3.
 */
typedef void (*svn_ra_progress_notify_func_t)(apr_off_t progress,
                                              apr_off_t total,
                                              void *baton,
                                              apr_pool_t *pool);

We should probably make the API docs explicit as well as making
all RA layers do consistent reporting.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-02 10:45:46 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.