views:

88

answers:

1

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?

+1  A: 

I have a similar app that is called that uses the svnlook and it works fine , 2 things to check/try are.

  1. Check that svnlook is included in your systempath (Test this by opening a command prompt and typing svnlook and checking if it outputs the usual (Type 'svnlook help' for usage))
  2. Try doing a re install of your svn tools , it maybe possible that svnlook got corrupted somehow.
RC1140