SharpSVN路径问题

发布于 2024-07-27 18:52:23 字数 1063 浏览 7 评论 0原文

使用 SharpSVN(1.5 和 1.6)检查代码时遇到问题。 (注意,我的机器上还安装了Tortoise 1.5)

同样的代码之前已经工作过,所以我不知道为什么事情可能会被破坏。

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
}

此代码从 SVN 中下载一个副本。 它会在名为 Sandbox 的目录中创建一个副本。

没有任何改变(除了我自己的系统配置,我将在一分钟内进行更改),但是,现在我收到错误:

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.

现在这太疯狂了。 这之前已经拉得很好了。 它告诉我运行“清理”暗示之前有一个工作副本!

另外,您还可以看到 SharpSVN 认为 .cs 文件位于 _svn 目录内部

关于我的设置.. 我的系统上有Tortoise 1.5(从Tortoise 1.6降级后看看是否可以解决这个问题..不行..

因为我是.net开发人员,我确实设置了Tortoise以使用_svn文件夹

有任何线索吗?甚至问题都是欢迎..

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..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你与昨日 2024-08-03 18:52:23

好吧,

显然这是一个无法解决的错误,与 Windows 中相对文件路径的最大长度有关。

Bert Huijben 在这里很好地回答了这个问题。

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

解决方案:放弃相对路径并使用完全限定路径

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文