简体   繁体   中英

C# svnadmin dump, strange behavior

i've written ac# application to check if a repository should be dumper or not (using some paramenters)

I've compiled this application on my computer (Winsows 8) where it works as intended. When i try to use it on two different windows server (2003 and 2008) with .net 4.5 installed, there is something wrong..

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:

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 svn version: 1.7.8 (sliksvn) Windows server 2003 svn verion: 1.5.8 Windows server 2008 svn version: 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 -r .\ -d

This fixed my problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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