svnlook总是返回错误并且没有输出
我正在运行这个从预提交批处理文件启动的小型 C# 测试程序,
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;
}
}
我故意调用 svnlook help 并强制发生错误,以便我可以看到提交时发生了什么。
当这个程序运行时,SVN显示
svnlook 退出并出现错误 0xC0000135。
当前输出为:空
我查找了错误 0xC0000135,这意味着 App 未能正确初始化
,尽管它不是特定于 svnhook 的。
为什么 svnlook help 没有返回任何内容?通过另一个进程执行时会失败吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有一个类似的应用程序,它使用 svnlook 并且工作正常,需要检查/尝试的两件事是。
I have a similar app that is called that uses the svnlook and it works fine , 2 things to check/try are.