[PATCH] Make stdout hot

Jonathan Perret Jonathan.Perret at augure.com
Wed Feb 7 07:21:30 EST 2007


Hello,

Below is a one-line patch to vss2svn.pl that makes the
script's standard output hot (unbuffered).

As I mentioned in my last message (Suggested vss2svn workflow)
I think vss2svn should always be run with the output
(both STDOUT and STDERR) directed to a file. Unfortunately
by default this leads Perl to buffer the script's messages to STDOUT.

Since the script is not very consistent about writing
to STDOUT vs. STDERR this results in messages occasionally
coming out of order. Rather than scrubbing the script, this
patch simply makes STDOUT behave like STDERR so that their
outputs are correctly interleaved.

Hope this helps,
--Jonathan

Index: script/vss2svn.pl
===================================================================
--- script/vss2svn.pl	(revision 291)
+++ script/vss2svn.pl	(working copy)
@@ -1579,6 +1579,9 @@
 #  Initialize
 
########################################################################
#######
 sub Initialize {
+    # make STDOUT hot (unbuffered)
+    $| = 1;
+
 
GetOptions(\%gCfg,'vssdir=s','tempdir=s','dumpfile=s','resume','verbose'
,
 
'debug','timing+','task=s','revtimerange=i','ssphys=s','encoding=s',
                'trunkdir=s', 'auto_props=s');



More information about the vss2svn-users mailing list