Reputation: 33
I did create a local repository on my pc. Then I did a svn checkout to access this repository and I can add and commit the files with tortoisesvn.
The repo is 'file///C:/Testing/repo'
and the local checkout is "C:\Testing\svn\repo"
I tried to add and commit some changes to a file with sharpsvn. I get an exceptions:
Unable to connect to a repository at URL 'file///C:/Testing/repo'
but when I open tortoisesvn I can access this repo. My code:
The add function does work, I only get an error with the commit.
.
.
.
foreach ( string path in files )
{
Add(path);
}
Commit(commitPath, key);
.
.
.
public bool Commit(string path, string message)
{
using ( SvnClient client = new SvnClient() )
{
SvnCommitArgs args = new SvnCommitArgs
{
LogMessage = message,
ThrowOnError = true,
ThrowOnCancel = true
};
try
{
return client.Commit(path, args); # <--- Exception
}
catch ( Exception e )
{
if ( e.InnerException != null )
{
throw new Exception(e.InnerException.Message, e);
}
throw e;
}
}
}
I can see that the files are added in the explorer, but it does not commit. I do not have any authentication set up for the repository, so I have no idea what on the problem could be.
Upvotes: 1
Views: 385
Reputation: 767
Most probably your TortoiseSVN created a newer repository format than SharpSVN can read. Due to lack of manpower, SharpSVN tends to lag a little bit behind nowadays.
Workarounds:
Upvotes: 0