views:

396

answers:

1

Having a problem with SharpSVN (1.5 and 1.6) checking out code. (Note, I also have Tortoise 1.5 installed on my machine)

This same code has worked previously, so I don't know why things might have broken.

using (SvnClient client = new SvnClient())
{
    SvnUriTarget url = new SvnUriTarget(checkoutURL.ToString());
    client.Authentication.DefaultCredentials = new NetworkCredential(userName, password);
    return client.CheckOut(url, destinationPath, out result); //error happens here
}

This code pulls Down a copy from SVN. It creates a copy into a directory named Sandbox.

Nothing has changed (except my own System configuration, I'll get to that in a minute), however, now I get the error:

SharpSvn.SvnException: 
Can't open file '..\..\..\TestHarness\Sandbox\testBuild\Trunk\TestProjects\XX\Source\XX.TestHarness\Tests\Service\_svn\tmp\text-base\IViewProject_Tester.cs.svn-base':
 The system cannot find the path specified.

Now this is crazy. This has pulled down fine before. For it to tell me to run "Cleanup" insinuates that there was a working copy there previously!

Also, you can also see that SharpSVN thinks that the .cs file is inside the _svn directory!

About my setup.. my system has Tortoise 1.5 on it (after downgrading from Tortoise 1.6 to see if I could fix this problem.. no go..

since I am a .net developer, I did set up Tortoise to use _svn folders

Any clues? Even questions are welcome..

+2  A: 

ok,

Apparently this is an unresolvable bug that is tied to the max length for relative file paths in Windows.

Bert Huijben answers the issue pretty well here.

http://sharpsvn.open.collab.net/ds/viewMessage.do?dsForumId=728&dsMessageId=331173

Solution: Ditch the relative path and Use a Fully Qualified path

KevinDeus
Many suddenly appearing long path issues will be resolved in Subversion 1.7 as the new working copy code will (internally) switch to absolute paths.
Bert Huijben