Re: [PATCH] Flush stdout more often
From: Stefan Haller <haller_at_ableton.com>
Date: 2006-04-09 18:28:43 CEST
Sorry to be a pest, but I'd like to bring this issue up again, hoping it
For those who missed the beginning of this thread (about two months
To recap: For operations that can take a long time to complete, such as
Looking back through the postings in this thread, quite a lot of people
Apart from diff, I'm not aware of any other places that need flushing;
May I ask for opinions again, please.
-- Stefan Haller Ableton http://www.ableton.com/ [[[ Flush stdout after every line of status output. This is useful when piping svn output into post-processor tools, e.g. to colorize the output, or simply into tee. * subversion/svn/diff-cmd.c (summarize_func): Flush output after every line printed. * subversion/svn/log-cmd.c (log_message_receiver): Flush output after every log entry. * subversion/svn/status.c (print_status): Flush output after every line printed. * subversion/svn/notify.c (notify): Flush output after every line printed. ]]] Index: subversion/svn/diff-cmd.c =================================================================== --- subversion/svn/diff-cmd.c (revision 19285) +++ subversion/svn/diff-cmd.c (working copy) @@ -83,6 +83,8 @@ summary->prop_changed ? 'M' : ' ', path)); + SVN_ERR(svn_cmdline_fflush(stdout)); + return SVN_NO_ERROR; } Index: subversion/svn/log-cmd.c =================================================================== --- subversion/svn/log-cmd.c (revision 19285) +++ subversion/svn/log-cmd.c (working copy) @@ -231,6 +231,8 @@ SVN_ERR(svn_cmdline_printf(pool, "\n%s\n", msg)); } + SVN_ERR(svn_cmdline_fflush(stdout)); + return SVN_NO_ERROR; } Index: subversion/svn/status.c =================================================================== --- subversion/svn/status.c (revision 19285) +++ subversion/svn/status.c (working copy) @@ -191,6 +191,8 @@ ? 'K' : ' '), path)); + SVN_ERR(svn_cmdline_fflush(stdout)); + return SVN_NO_ERROR; } Index: subversion/svn/notify.c =================================================================== --- subversion/svn/notify.c (revision 19285) +++ subversion/svn/notify.c (working copy) @@ -344,7 +344,6 @@ if ((err = svn_cmdline_printf(pool, "."))) goto print_error; - fflush(stdout); break; case svn_wc_notify_locked: @@ -368,6 +367,9 @@ break; } + if ((err = svn_cmdline_fflush(stdout))) + goto print_error; + return; print_error: --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.orgReceived on Sun Apr 9 18:29:57 2006 |
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.