[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 12:40:27 +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.
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.

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.


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

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