开发者

svnlook always returns an error and no output

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开发者_JAVA百科.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?


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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜