문제

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