On Wed, Aug 12, 2009 at 10:30:58AM -0700, Paul T. Burba wrote:
> Author: pburba
> Date: Wed Aug 12 10:30:58 2009
> New Revision: 38698
>
> Log:
> Follow-up to r38621, fix svnlook_tests.py 3 and 9 failures on Windows.
>
> * subversion/svnlook/main.c
> (display_prop_diffs): Writing to stdout via svn_cmdline_printf() and then
> getting a stream for stdout via svn_stream_for_stdout() and writing to
> that stream can cause unpredictable ordering of the output when redirecting
> svnlook's stdout (actually in my testing it is always and consistently
> mis-ordered, but I'm uncertain that will always be true). This can be
> avoided by flushing stdout prior to obtaining the stream.
Paul, thanks a million! I took a brief look at the failures a few days
ago and could not figure out what the problem was (I thought it was
maybe related to line-endings). I was gonna look into this again, but I
guess I never would have figured out that flushing stdout was the fix!
Stefan
>
> Modified:
> trunk/subversion/svnlook/main.c
>
> Modified: trunk/subversion/svnlook/main.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/svnlook/main.c?pathrev=38698&r1=38697&r2=38698
> ==============================================================================
> --- trunk/subversion/svnlook/main.c Wed Aug 12 10:09:41 2009 (r38697)
> +++ trunk/subversion/svnlook/main.c Wed Aug 12 10:30:58 2009 (r38698)
> @@ -833,6 +833,9 @@ display_prop_diffs(const apr_array_heade
> header_fmt = _("Modified: %s\n");
> SVN_ERR(svn_cmdline_printf(pool, header_fmt, pc->name));
>
> + /* Flush stdout before we open a stream to it below. */
> + SVN_ERR(svn_cmdline_fflush(stdout));
> +
> {
> svn_stream_t *out;
> svn_diff_t *diff;
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2382960
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2383054
Received on 2009-08-13 00:27:20 CEST