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

Re: svn commands and dos redirection

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 8 May 2012 00:41:52 +0300

See line 1063:1085 of
https://svn.apache.org/repos/asf/subversion/trunk/subversion/svnlook/main.c
for one possible explanation. If that is the case here, too, you would
need to disable stdout buffering --- adding a flush() call to svn's code
is the easiest way, but perhaps not the only way, to do that.

Christophe R wrote on Sun, May 06, 2012 at 21:23:59 -0700:
> Hi,
>
> Under Windows XP, with svn 1.6.17 (I also tried with 1.7.4) running
> svn pl -R -v .
> works as expected (I get a line "properties on <item>, followed by the
> properties), for each item.
>
> But when I redirect the same command to a file:
> svn pl -R . >foo.txt
> the output in the resulting file is out of order: the "propeties on '.'
> " line shows up after 658 lines of properties! And it is followed by 100
> lines "properties on". There are long blocks of properties without
> "properties on" header.
>
> adding the --xml option keeps the proper order, both on console and when
> redirected.
>
> This makes it difficult to write DOS scripts that handle svn output...I
> have also tried using loops instead of redirection, but things still
> show out of order:
> FOR /F "usebackq tokens=* " %% IN in (`svn pl -R -v .>`) DO (ECHO %%G)
> I also try piping, no luck, the following gives a messed up output too:
> svn pl -R -v . | more
>
> I ended up looping on each item, calling svn pl each time, but this is
> painful (dealing with hidden items etc...)
>
> svn pg seems to be working.
>
> Is it just me? Or a defect? Any workaround (other than --xml or using
> something more evolved than batch file)? Would there be other commands
> affected?
>
> Thanks
>
> Christophe
Received on 2012-05-07 23:42:28 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.