Index: subversion/include/svn_cmdline.h =================================================================== --- subversion/include/svn_cmdline.h (revision 26885) +++ subversion/include/svn_cmdline.h (working copy) @@ -41,9 +41,10 @@ /** Set up the locale for character conversion, and initialize APR. - * If @a error_stream is non-null, print error messages to the stream, - * using @a progname as the program name. Return @c EXIT_SUCCESS if - * successful, otherwise @c EXIT_FAILURE. + * If @a error_stream is non-NULL, print error messages to the stream, + * using @a progname as the program name. Attempt to set @c stdout to + * line-buffered mode, and @a error_stream to unbuffered mode. Return + * @c EXIT_SUCCESS if successful, otherwise @c EXIT_FAILURE. * * @note This function should be called exactly once at program startup, * before calling any other APR or Subversion functions. Index: subversion/libsvn_subr/cmdline.c =================================================================== --- subversion/libsvn_subr/cmdline.c (revision 26885) +++ subversion/libsvn_subr/cmdline.c (working copy) @@ -2,7 +2,7 @@ * cmdline.c : Helpers for command-line programs. * * ==================================================================== - * Copyright (c) 2000-2006 CollabNet. All rights reserved. + * Copyright (c) 2000-2007 CollabNet. All rights reserved. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -18,6 +18,7 @@ #include /* for atexit() */ +#include /* for setvbuf() */ #include /* for setlocale() */ #ifndef WIN32 @@ -88,6 +89,9 @@ } #endif + setvbuf(error_stream, NULL, _IONBF, 0); + setvbuf(stdout, NULL, _IOLBF, 0); + #ifdef WIN32 #if _MSC_VER < 1400 /* Initialize the input and output encodings. */