简体   繁体   中英

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.

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);.

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