[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 16:15:39 +0300 (Jerusalem Daylight Time)

Stefan Küng wrote on Sat, 2 Aug 2008 at 14:45 +0200:
> Daniel Shahaf wrote:
> > > An example (pseudo-checkout):
> > > callback(200, -1) // for connecting
> > > callback(300, -1) // for info packets
> > > callback(512, 123000) // first file
> > > callback(512, 123000) // first file
> > > callback(512, 123000) // first file
> > > ...
> > > callback(30, 123000) // first file
> > > callback(300, -1) // for info packets
> > > callback(512, 234000) // second file
> > > callback(512, 234000) // second file
> > > callback(512, 234000) // second file
> > > ...
> > > callback(30, 234000) // second file
> > >
> > > Does this explain it more clear? If not, just ask.
> > >
> >
> > I don't understand anything here. The 'total' values you provide are
> > not very helpful -- they are neither a lower bound nor an upper bound on
> > the number of bytes that will be transferred -- so what *do* they mean?
> >
> > (They are not a lower bound because the last callback() on the last file
> > will still report that file's size as 'total'. They are not an upper
> > bound because after the series of calls for the first file, with
> > total=123000, comes another file.)
> >
> > For reference, svn_ra_progress_notify_func_t's says that "@a total is
> > the total number of bytes to transfer or -1 if it's not known".
>
> I use this in TSVN when big files are transferred. Imagine a file has 100MB in
> size. Without that 'intermediate total' I get from neon, there would be
> nothing to show to the user. But with that intermediate total, I can show a
> progress bar so the user can see how long it will take to transfer that big
> file (the progress bar is hidden again after that big file has been
> transferred - I only show the bar for big file, not the small ones).
>
> I know it's not as good as an upper bound total, but that would require big
> changes to the svn code to really get that number. And it's better than
> nothing - I take what I can get.
>

Okay, thanks for the explanation. It makes sense, but it needs to be
documented -- our docstring doesn't even say the word "file" right now.

---------------------------------------------------------------------
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 15:16:00 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.