Daniel Shahaf wrote:
> 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.
But that would break the compatibility.
Progress info for ra_svn was added in 1.5, while it was available for
ra_neon in 1.3.
>
>> 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?
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.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
Received on 2008-08-02 13:32:01 CEST