[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: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 2 Aug 2008 14:09:31 +0300 (Jerusalem Daylight Time)

Stefan Küng wrote on Sat, 2 Aug 2008 at 12:40 +0200:
> Daniel Shahaf wrote:
> > Stefan Küng wrote on Sat, 2 Aug 2008 at 12:27 +0200:
> > > Stefan Sperling wrote:
> > > > 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
> >
> > As I read it, it promises the (current) ra_svn behaviour.
>
> Yes, but it works not the same way as neon and serf. Since the callback for
> neon is actually done in the neon library, we can't change that.

We could write a wrapper callback that manipulates (sums) what neon
reports.

> Neon does it this way because it can 'restart' when needed. For example, most
> of the time the total is not known beforehand. But sometimes it is. Neon then
> fills in the 'total' param (instead of passing -1 there) and starts counting
> the bytes again.
>

I'm not familiar with 'restarts' in this context. From your description
it sounds that they have to do with how neon calculates the number of
bytes it has transferred, not with whether it chooses to report that
number directly or as a difference since the preceding reported amount.

Am I missing something?

> So, I think the way neon/serf handle this is the correct way, even though the
> docs string says otherwise and ra_svn does it that way.
>

---------------------------------------------------------------------
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 13:09:52 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.