1

我是中国的程序员。我想将我计算机中工作副本的更改提交到存储库。存储库位于 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
            }

}</p>

但它不起作用,为什么?谢谢!

4

1 回答 1

2

我知道了。必须设置 SvnCommitArg 的 LogMessage。

于 2010-05-14T08:11:33.243 回答