代码之家  ›  专栏  ›  技术社区  ›  Pierre-Alain Vigeant

svnlook总是返回一个错误,没有输出

  •  1
  • Pierre-Alain Vigeant  · 技术社区  · 15 年前

    我正在运行这个从预提交批处理文件启动的小型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退出,错误为0xc000135。

    电流输出为:空

    我查找了错误0xC0000135,它的意思是 App failed to initialize properly 尽管它不是针对Svnhook的。

    为什么是 svnlook帮助 没有退货?当通过另一个进程执行时是否失败?

    1 回复  |  直到 15 年前
        1
  •  2
  •   RC1140    15 年前

    我有一个类似的应用程序,叫做使用svnlook,它工作正常,有两件事需要检查/尝试。

    1. 检查系统路径中是否包含svnlook(通过打开命令提示符并键入svnlook并检查它是否输出常规值(键入“svnlook help”了解用法)来测试此问题)
    2. 尝试重新安装您的SVN工具,可能是因为SVnlook以某种方式损坏了。