Do you use the local path when attempting to commit something in SharpSVN? I am not understanding how this library works with an online subversion repository. Very confused. any help would be great. hear is how I attempt to commit...

using (SvnClient client = new SvnClient())
        {
            SvnCommitArgs args = new SvnCommitArgs();

            args.LogMessage = message;
            args.ThrowOnError = true;
            args.ThrowOnCancel = true;

            try
            {
                return client.Commit(path, args);
            }
            catch (Exception e)
            {
                if (e.InnerException != null)
                {
                    throw new Exception(e.InnerException.Message, e);
                }

                throw e;
            }
        }
有帮助吗?

解决方案

In Subversion you commit changes from a local working copy to a repository.

So you first checkout a working copy (E.g. with SvnClient.CheckOut), then you perform some changes.

And after you are done performing changes you commit all your changes to the repository. See http://svnbook.red-bean.com/ for basic subversion information.

ThrowOnError defaults to true, so you don't have to set that. And to allow cancelling you need to set some callbacks, so you can usually just ignore that case.

In case of commit errors Subversion usually returns several errors at once, so you don't just want to look at the outer or one of the inner exceptions, but to the entire error chain.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top