当前位置: 动力学知识库 > 问答 > 编程问答 >

winforms - Commit all files in a folder to SVN repository using sharpsvn

问题描述:

I hava c# winforms application and in the form I have a button. On click of the button I want to commit all files in a particular folder to the SVN repository , but i keep getting

Folder is not a working copy error.

Below code is called on click event:

private void Save_Config_Click(object sender, EventArgs e)

{

#if DEBUG

path = @"../../../Application";

#endif

using (SvnClient client = new SvnClient())

{

SvnCommitArgs args = new SvnCommitArgs();

args.LogMessage = "test";

args.ThrowOnError = true;

args.ThrowOnCancel = true;

try

{

client.Commit(path, args);

}

catch (Exception s)

{

if (s.InnerException != null)

{

throw new Exception(s.InnerException.Message, s);

}

throw s;

}

网友答案:

To Commit from a folder, that folder must be a working copy. You must checkout before you make the commit.

分享给朋友:
您可能感兴趣的文章:
随机阅读: