On 05.09.2013 22:07, Brandon Bonds wrote:
> Running the build of svnversion which is installed with TortoiseSVN does not send output to stdout. As a result, build tools such as msbuild cannot read the Subversion revision number.
>
> This can be reproduced by the following PowerShell script (arguments need to be changed for your system):
>
> #-----begin script----#
>
> $pinfo = New-Object System.Diagnostics.ProcessStartInfo
> $pinfo.FileName = "C:\Program Files\TortoiseSVN\bin\svnversion.exe"
> $pinfo.Arguments = "--no-newline `"C:/svn/tortoisesvn`""
> $pinfo.RedirectStandardError = $true
> $pinfo.RedirectStandardOutput = $true
> $pinfo.UseShellExecute = $false
> $p = New-Object System.Diagnostics.Process
> $p.StartInfo = $pinfo
> $p.Start() | Out-Null
> $p.WaitForExit()
> $stderr = $p.StandardError.ReadToEnd()
> $stdout = $p.StandardOutput.ReadToEnd()
> Write-Host "stdout: $stdout"
> Write-Host "stderr: $stderr"
> Write-Host "exit code: " + $p.ExitCode
>
> #-----end script----#
>
> No information is sent to stdout. The expected behavior is that the revision number is output to stdout.
>
> Changing the location of svnversion.exe from "C:\Program Files\TortoiseSVN\bin\" to another distribution, for example "C:\Program Files\SlikSVN\bin\", results in the expected behavior.
>
> Thank you for looking into this!
Works fine for me.
Also: you can test that it outputs to stdout much easier on a normal
console:
$ "C:\Program Files\TortoiseSVN\bin\svnversion.exe" C:\svn\tortoisesvn >
output.txt
and then you can see that output.txt contains the information.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3064027
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-09-05 22:51:58 CEST