[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 Küng <tortoisesvn_at_gmail.com>
Date: Sat, 02 Aug 2008 14:45:02 +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.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net

Received on 2008-08-02 14:45:21 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.