[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: Gerald Richter <richter_at_ecos.de>
Date: 2003-04-25 21:03:48 CEST

Hi,

>
> 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.

That's excatly what I wrote in my mail. I know that this is the very wrong
place for a printf, but I don't know how to use the svn feedback system and
I am currently have no time to find it out (also I would be very much
happier when I had time and would be able to submit the right patch). I just
needed this quick hack for making one of my scripts happy (which will
otherwise think svn has timedout)

>
> 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.

I don't do that. I the printf is terminated with a \r, which only sets the
cursor to the start of the line, so you see the count growing in the same
line during the download and the count will be overwritten by the filename
when the download is ready. This is the best UI for a commandline
application I can think of. You don't need curses for that. This works at
least on Unix and Windows, I am not sure about the MacOS.

So I submitted the patch, because I though it maybe a starting point for
somebodyelse who is more familiar with the svn inernal and can implement it
the right way. If not it is at least a reminder in the issue database to do
it one time and if nobody takes it I will be hopefully able sometime to do
it on my own.

Gerald

--------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
--------------------------------------------------------------
|
| ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 25 21:04:39 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.