简体   繁体   English

C#svnadmin转储,奇怪的行为

[英]C# svnadmin dump, strange behavior

i've written ac# application to check if a repository should be dumper or not (using some paramenters) 我已经编写了ac#应用程序,以检查存储库是否应为转储者(使用某些参数)

I've compiled this application on my computer (Winsows 8) where it works as intended. 我已经在可以正常运行的计算机(Winsows 8)上编译了该应用程序。 When i try to use it on two different windows server (2003 and 2008) with .net 4.5 installed, there is something wrong.. 当我尝试在安装了.net 4.5的两个不同的Windows服务器(2003和2008)上使用它时,出现了问题。

before that i talk about the problems i get i'll show you part of the code i made to make this app work: 在此之前,我将讨论我遇到的问题,然后向您展示为使该应用程序正常工作而编写的部分代码:

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

where dir is the actual name of the repository, the exec function is as follow: 其中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;
    }
}

what i get is that, when i run this on Windows 8, it works as intended when i run this on Server 2003 it dumps only revision 0 when i run this on Server 2008 it returns an error (it is not a repository!) 我得到的是,当我在Windows 8上运行它时,它按预期工作,而在Server 2003上运行时,它仅转储修订版0,而我在Server 2008上运行时,它返回错误(不是存储库!)。

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

any help is appreaciated, thanks in advance 感谢您的帮助,在此先感谢

I had a similar problem with the "it is not a repository!" 我对“它不是存储库!”也有类似的问题。 problem. 问题。 To fix this, I used svnserve. 为了解决这个问题,我使用了svnserve。

svnserve -r .\ -d

This fixed my problem. 这解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM