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

Re: [PATCH] progress output in svn up

From: Sander Roobol <phy_at_wanadoo.nl>
Date: 2003-04-25 14:34:43 CEST

Filed as issue #1264.

Sander

On Thu, Apr 17, 2003 at 06:38:59AM +0200, Gerald Richter wrote:
> Hi,
>
> I have made a little patch that outputs some progress informations during
> svn up. It will print n/m where n is number of bytes transfered so far and m
> is the number to transfer, if known. This is extremly usfull when you update
> large files over slow links.
>
> The patch directly writes to stdout which is of course not correct, but
> maybe somebody is able to integrate it into subversion the right way.
>
> I have talked to Ben at the APacheCon and he ask me to send the patch. I did
> that, but didn't got any feedback, so maybe he never have got it and I send
> it again to the list.
>
> The patch is against 0.21.0
>
> Gerald
>
>
> --- subversion/libsvn_ra_dav/fetch.c.orig Wed Apr 16 21:28:45 2003
> +++ subversion/libsvn_ra_dav/fetch.c Wed Apr 16 21:31:17 2003
> @@ -666,6 +666,14 @@
> }
> }
>
> +static void fetch_file_progress(void *userdata, off_t progress, off_t
> total)
> +{
> + printf ("%d/%d\r", progress, total) ;
> + fflush(stdout) ;
> +}
> +
> static svn_error_t *simple_fetch_file(ne_session *sess,
> const char *url,
> const char *relpath,
> @@ -699,6 +707,10 @@
>
> frc.pool = pool;
>
> + ne_set_progress (sess, fetch_file_progress, NULL) ;
> +
> SVN_ERR( custom_get_request(sess, url, relpath,
> fetch_file_reader, &frc,
> get_wc_prop, cb_baton,
> @@ -706,6 +718,10 @@
>
> /* close the handler, since the file reading completed successfully. */
> SVN_ERR( (*frc.handler)(NULL, frc.handler_baton) );
> +
> + ne_set_progress (sess, NULL, NULL) ;
>
> return SVN_NO_ERROR;
> }
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 25 14:35:30 2003

This is an archived mail posted to the Subversion Dev mailing list.