2
我已經寫了一個C#應用程序來檢查庫應(使用多參數)C#svnadmin的轉儲,奇怪的行爲
我已經在我的電腦上編譯這個應用程序是自卸車與否(Winsows 8)哪裏按預期工作。 當我嘗試使用它在兩個不同的Windows服務器(2003年和2008年)與.NET 4.5安裝,有什麼問題..
在此之前,我談論我遇到的問題我會告訴你的一部分代碼我做了,使這個應用程序的工作:
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
任何幫助appreaciated, 在此先感謝