C# svnadmin 转储,奇怪的行为

标签 c# svn dump behavior svnadmin

我已经编写了一个 C# 应用程序来检查存储库是否应该是 dumper(使用一些参数)

我已经在我的计算机 (Winsows 8) 上编译了这个应用程序,它可以按预期运行。 当我尝试在安装了 .net 4.5 的两个不同的 Windows 服务器(2003 和 2008)上使用它时,出现了问题..

在讨论我遇到的问题之前,我将向您展示我为使该应用程序正常运行而编写的部分代码:

output[2] = exec("svnadmin dump " + dir + " > " + dir + ".dump");

其中dir是存储库的实际名称,exec函数如下:

public string exec(object command)
{
    try
    {
        System.Diagnostics.ProcessStartInfo procStartInfo =
        new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);

        procStartInfo.RedirectStandardOutput = true;
        procStartInfo.UseShellExecute = false;
        procStartInfo.CreateNoWindow = true;
        System.Diagnostics.Process proc = new System.Diagnostics.Process();
        proc.StartInfo = procStartInfo;
        proc.Start();
        return proc.StandardOutput.ReadToEnd();
    }
    catch (Exception objException)
    {
        return "Error: " + objException;
    }
}

我得到的是,当我在 Windows 8 上运行它时,它按预期工作 当我在 Server 2003 上运行它时,它只转储版本 0 当我在 Server 2008 上运行它时它返回一个错误(它不是一个存储库!)

Windows 8 svn 版本:1.7.8 (sliksvn) Windows Server 2003 svn 版本:1.5.8 Windows server 2008 svn版本:1.7.9

感谢任何帮助, 提前致谢

最佳答案

我对“它不是存储库!”有类似的问题。问题。为了解决这个问题,我使用了 svnserve。

svnserve -r .\ -d

这解决了我的问题。

关于C# svnadmin 转储,奇怪的行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16010813/

相关文章:

C# WPF System.Drawing.Image 到 System.Windows.Media.Imaging.BitmapSource

c# - 如何从c#中的xml字符串中获取特定值

svn - 未在存储库中完成时 svn copy 便宜吗?

c++ - 我如何将堆栈转储到 Arduino 中?

oracle - PL/SQL 开发人员导入转储

c# - Selenium Webdriver 单击并发送 key 等在 Google Chrome 版本 78.0.3904.87 上不起作用

c# - 如何使用依赖于模型属性的接口(interface)设计领域模型

performance - SVN ls 命令 super 慢

svn - Subversion 在 '..\..\..\subversion\libsvn_wc\update_editor.c 的第 1550 行报告故障 'action == svn_wc_conflict_action_delete'

C# 如何在运行时转储所有变量和当前值