svnlook always returns an error and no output
- by Pierre-Alain Vigeant
I'm running this small C# test program launched from a pre-commit batch file
private static int Test(string[] args)
{
var processStartInfo = new ProcessStartInfo
{
FileName = "svnlook.exe",
UseShellExecute = false,
ErrorDialog = false,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
Arguments = "help"
};
using (var svnlook = Process.Start(processStartInfo))
{
string output = svnlook.StandardOutput.ReadToEnd();
svnlook.WaitForExit();
Console.Error.WriteLine("svnlook exited with error 0x{0}.", svnlook.ExitCode.ToString("X"));
Console.Error.WriteLine("Current output is: {0}", string.IsNullOrEmpty(output) ? "empty" : output);
return 1;
}
}
I am deliberately calling svnlook help and forcing an error so I can see what is going on when committing.
When this program run, SVN displays
svnlook exited with error 0xC0000135.
Current output is: empty
I looked up the error 0xC0000135 and it mean App failed to initialize properly although it wasn't specific to svnhook.
Why is svnlook help not returning anything? Does it fail when executed through another process?