简体   繁体   English

如何使用C#.NET使用Sharpsvn将本地文件导入SVN

[英]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. 我正在一个像SVN一样工作的项目,能够创建存储库,签出,创建用户并提交,但是在导入过程中出现错误“工作副本'E:\\ Admin \\ admin'太旧(格式10,由Subversion创建) 1.6)”,其中一些显示未找到路径。

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

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

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