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

Re: [PATCH] Update progress while ra-neon spools text delta

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: 2007-08-23 03:02:29 CEST

Eric, the patch looks good. One minor question below...

On Aug 16, 2007, at 5:47 PM, Eric Gillespie wrote:
...
> --- subversion/libsvn_ra_neon/commit.c (revision 26021)
> +++ subversion/libsvn_ra_neon/commit.c (working copy)
> @@ -105,6 +105,9 @@
> apr_file_t *tmpfile; /* may be NULL for content-less file */
> svn_stringbuf_t *fname; /* may be NULL for content-less file */
> const char *base_checksum; /* hex md5 of base text; may be null */
> + apr_off_t progress;
> + svn_ra_neon__session_t *ras;
> + apr_pool_t *pool;
> } put_baton_t;
>
> typedef struct
> @@ -1122,6 +1125,8 @@
> if (status)
> return svn_error_wrap_apr(status,
> _("Could not write svndiff to temp
> file"));
> + pb->progress += *len;
> + pb->ras->progress_func(pb->progress, -1, pb->ras-
> >progress_baton, pb->pool);
>
> return SVN_NO_ERROR;
> }
> @@ -1138,6 +1143,8 @@
> svn_stream_t *stream;
>
> baton = apr_pcalloc(file->pool, sizeof(*baton));
> + baton->ras = file->cc->ras;
> + baton->pool = pool;
> file->put_baton = baton;
>
> if (base_checksum)

Should we use file->pool instead of the pool parameter passed to
commit_apply_txdelta()? I think baton's useful lifetime is that of
commit_apply_txdelta()'s stack frame, but since it's allocated out of
file->pool rather than pool, I think it would be more correct unless
we document that put_baton_t.pool should be used only for temporary
allocations.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 23 02:53:12 2007

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.