[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] notification callbacks for network data transfers

From: Branko ÄŒibej <brane_at_xbc.nu>
Date: 2005-08-19 19:17:58 CEST

Stefan Küng wrote:

> Hi,
>
> The attached patch implements a notification callback UI clients can
> use to show progress information during long network transfers (e.g.
> import of a file which is some megs in size). It only does this for
> DAV connections for now, svn:// and file:// don't use this callback yet.
> Log message is in the patch.
> (See also Issue 901)
>
> Stefan
>
> P.S. Please comment only on what the patch does and ignore style
> issues for now. We can deal with those later.

O.K. :)

Looks good in principle, but I think there's an API compatibility problem.

>Index: subversion/include/svn_ra.h
>===================================================================
>--- subversion/include/svn_ra.h (Revision 15819)
>+++ subversion/include/svn_ra.h (Arbeitskopie)
>@@ -31,6 +31,7 @@
> #include "svn_error.h"
> #include "svn_delta.h"
> #include "svn_auth.h"
>+#include "svn_progress.h"
>
> #ifdef __cplusplus
> extern "C" {
>@@ -347,6 +348,8 @@
> /** Invalidate working copy properties. */
> svn_ra_invalidate_wc_props_func_t invalidate_wc_props;
>
>+ svn_progress_notify_func_t progress_func;
>+ void *progress_baton;
> } svn_ra_callbacks_t;
>
>
You can't do that. This is a public struct that gets allocated
elsewhere, so you can't change it in a minor release.

I think you'll have to rev svn_ra_open and svn_ra_plugin_t::open and add
the progress_func and progress_baton parameters there. Should be fairly
easy to do.

(Note that svn_client_ctx_t is different, we have an allocator function
for it.)

>+static void
>+svn_ra_dav__neonprogress(void * baton, off_t progress, off_t total)
>+{
>+ const svn_ra_callbacks_t * callbacks = (svn_ra_callbacks_t *)baton;
>
>
You don't need the cast here. Sorry, couldn't resist the style nit. :)

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 19 19:21:05 2005

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.