[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: Jani Monoses <jani_at_iv.ro>
Date: 2003-04-25 16:48:37 CEST

One place where percentage would be useful is for large commits
where files are added one per line and then several screenfulls of dots
start marching without indication of when it'll end :)

> Hi Gerald, good to hear from you again.
>
> This indeed may be a very nice feature, but there are some problems
> with the implementation.
>
> > --- 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) ;
> > +}
>
> For example: printf() is strictly verboten in all libraries. Only
> applications can do that. So for a feature like this, you'll need to
> make use of our feedback system, and then add a proper callback within
> clients/cmdline/main.c.
>
> The other problem here is UI -- I'm not so sure it's a good idea to
> print download percentages on a series of new lines. The output of
> 'svn co/up' is very specific and very parseable -- one file per line.
> I think the least invasive thing to do is have main.c's callback use
> something like the curses library. It can repeatedly print progress
> information on the same line. I'm not sure how portable curses is,
> though. :-(
>
>
> ---------------------------------------------------------------------
> 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 16:41:38 2003

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.