I'm trying to use SharpSVN to automate Subversion check-ins, but I'm having a problem with the SvnClient.Add() method and I believe it may be a bug. Essentially, .Add() isn't seeing the path as a working copy, however, SvnClient.GetUriFromWorkingCopy() sees it just fine. It appears that .Add() is looking 1 directory higher than it should and I can't seem trick .Add() by using . or ..
My code proof is below. Replicate by pointing the path to the top level of a working copy and run. Any help appreciated!
static void Main(string[] args)
{
string PathToTest = @"C:\temp\sqlcompare";
SvnClient client = new SvnClient();
SvnAddArgs saa = new SvnAddArgs();
saa.Force = true;
saa.Depth = SvnDepth.Infinity;
Console.WriteLine(PathToTest);
Console.WriteLine(client.GetUriFromWorkingCopy(PathToTest));
try
{
client.Add(PathToTest, saa);
Console.WriteLine(@"Success");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Console.ReadKey();
}
And the output this produces:
C:\temp\sqlcompare
https://thisismycompanyname.svn.cvsdude.com/project/soltuionname/trunk/Database/
'C:\temp' is not a working copy
Adding a trailing slash won't work either:
C:\temp\sqlcompare\
https://thisismycompanyname.svn.cvsdude.com/project/soltuionname/trunk/Database/
'C:\temp' is not a working copy