我是中国的程序员。 我想将计算机中工作副本的更改提交到存储库。存储库位于URL中,我现在正在执行此操作:
using (SvnClient client = new SvnClient()){
string path = @"C:\testdelete\test.java";
client.Delete(path);
client.Authentication.Clear(); // Clear predefined handlers
client.Authentication.UserNamePasswordHandlers += delegate(object obj, SharpSvn.Security.SvnUserNamePasswordEventArgs args)
{
args.UserName = "username";
args.Password = "password";
};
var uri = client.GetUriFromWorkingCopy(path);
if (uri != null)
{
SvnCommitArgs args = new SvnCommitArgs();
args.ThrowOnError = true;
args.ThrowOnCancel = true;
client.Commit(path, args);//here throw a SvnOperationCanceledException
}
}
但它不起作用,为什么?谢谢!
答案 0 :(得分:2)
我明白了。 必须设置SvnCommitArg的LogMessage。