[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Flush stdout more often

From: Mattias Engdegård <mattias_at_virtutech.se>
Date: 2006-04-10 00:03:01 CEST

haller@ableton.com (Stefan Haller) writes:

>To recap: For operations that can take a long time to complete, such as
>status or update, it is nice to flush stdout after every line of status
>output, to give nicer behaviour when piping output into, say, a pager,
>or tee.

What about the following trivial script:

#!/usr/bin/env python
import sys, os
(pid, master) = os.forkpty()
if pid == 0:
    os.execvp(sys.argv[1], sys.argv[1:])
while 1:
        s = os.read(master, 0x1000)

Instead of littering your flushes all over the code, just run your subversion
command through this. No svn changes necessary.

(If you insist in changing the client, why not add a global option
which just sets the stdout buffering to line mode?)

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 10 00:03:53 2006

This is an archived mail posted to the Subversion Dev mailing list.