tags:

views:

50

answers:

1

Hi,I'm a programmer in china. I want to commit the changes of a working copy in my computer to the repository. The repository is in an URL and i´m doing this now:

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
            }

But it doesn´t work,Why?Thanks!

A: 

I got it. The LogMessage of SvnCommitArg must be setted.

zhangxiaoning