svnlook always returns an error and no output

Posted by Pierre-Alain Vigeant on Stack Overflow See other posts from Stack Overflow or by Pierre-Alain Vigeant
Published on 2010-03-16T19:42:17Z Indexed on 2010/03/17 15:21 UTC
Read the original article Hit count: 372

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about svn

Related posts about pre-commit-hook