[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: Sergey Azarkevich <azarkevich_at_gmail.com>
Date: Tue, 10 Sep 2013 07:23:56 +0300

>
> 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;
> process.Start();
> Console.WriteLine("stdout:");
> Console.WriteLine(process.StandardOutput.ReadToEnd());
> Console.WriteLine("stderr:");
> Console.WriteLine(process.StandardError.ReadToEnd());
>

I suspect that you should wait until process completes with method
WaitForExit() and then read output:
process.Start();
process.WaitForExit();
... check for exit code
.. read output

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3064246

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-09-10 06:24:02 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.