naani
naani

Reputation: 83

How to import local files to SVN with sharpsvn using C#.NET

I am working on a project which works like SVN, able to create repository, checkout, creating users and commit but during an import getting an error "Working copy 'E:\Admin\admin' is too old (format 10, created by Subversion 1.6)" and some it's showing path not found.

     using (SvnClient client = new SvnClient())
        {
            SvnAddArgs saa = new SvnAddArgs();
            saa.Force = true;
            saa.Depth = SvnDepth.Infinity;

            SvnImportArgs ca = new SvnImportArgs();

            ca.LogMessage = "some log message";

            SvnCommitResult result;

            Uri uri = new Uri(getPathToRepository());

            String fileName = getPathToFile();
            client.Authentication.DefaultCredentials = new System.Net.NetworkCredential("koteswar", "neeraja");

            client.Import(fileName, uri, ca, out result);

        }

How this thing can be solvable, Thanks.

Upvotes: 1

Views: 2062

Answers (1)

naani
naani

Reputation: 83

I found the solution, it was quite specific to my case though.

client.Import(fileName, 
new Uri("https://koteshwar:8443/svn/"+comboBox1.SelectedItem+"/trunk"), ca, out result);.

Upvotes: 1

Related Questions