[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: Matt Kraai <kraai_at_alumni.cmu.edu>
Date: 2003-04-25 16:37:52 CEST

On Fri, Apr 25, 2003 at 08:52:54AM -0500, Ben Collins-Sussman wrote:
> 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. :-(

You don't need to use curses, just use \r. e.g.,

  printf (" 0%%");
  fflush (stdout);
  ...
  printf ("\r %2d%%", percentage);
  fflush (stdout);
  ...
  printf ("\r100%%\n");

Matt

-- 
Matt Kraai <kraai@alumni.cmu.edu>
Debian GNU/Linux Peon
---------------------------------------------------------------------
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:38: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.