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

RE: Re: svnversion does not output to stdout

From: Brandon Bonds <bondsbw_at_hotmail.com>
Date: Mon, 9 Sep 2013 16:52:10 -0700 (PDT)

Thank you both for looking into this.

The point wasn't really about Powershell. My real problem is that the SvnVersion task from MSBuild Community Tasks cannot pick up the version number. It's written in .NET; I just figured PS might be easier for more people to try, over C#.

But here goes: this is C# code with the same behavior, and this is roughly equivalent to what the MSBuild Community Tasks uses in its SvnVersion task:

//-----begin script----

Process process = new Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.FileName = @"C:\Program Files\TortoiseSVN\bin\svnversion.exe";
process.StartInfo.Arguments = @"--no-newline ""C:/svn/tortoisesvn""";
process.StartInfo.WorkingDirectory = null;

//-----end script----

On my computer I get the same behavior. And I noticed this same behavior when I worked at a previous company, I just never investigated until now.

As for the examples you both gave:

BladeOfLight16, your example also fails on my system. Changing to SlikSVN works. I ran both normal PS and the ISE, under both normal and Administrator accounts.

steveking's cmd redirect example works. Piping through the "more" command also works. So it seems that something is different about how cmd and .NET work with stdout.

I am running .NET 4.5 and Powershell 3.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-09-10 01:52:15 CEST

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

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