颠覆,更名,啥?

发布于 2024-10-07 08:07:17 字数 528 浏览 2 评论 0原文

所以我有一个有趣的问题。

Subversion,如果唯一的区别是大小写,则不允许重命名具有相同名称的项目。 Netbeans 具有颠覆性。如果大小写发生变化,Netbeans 允许您重命名文件。

我在 subversion 中将名为 eventCreator.php 的内容重命名为 EventCreator.php 并上传(它是一个类)。 Netbeans 中一切顺利。事实上,我还做了大约 10 次提交。我尝试在另一台计算机上下载它,这就是发生的错误
"无法打开文件
C:\xampp\htdocs\MyProject\scripts.svn\tmp\text-base\eventCreator.php.svn-base':
系统找不到指定的文件。"< br>

我的存储库位于 DreamHost。因此,我转到 dreamhost,可以进入脚本文件夹并在存储库中查看 eventCreator.php 和 EventCreator.php,但我无法使用 netbeans 或 tortoiseSVN 下载它。
有任何帮助吗?

So i have a funny problem.

Subversion, you are not allowed to rename items with the same name if the only difference is capitalization. Netbeans has subversion. Netbeans allows you to rename files if the capitalization changes.

I renamed something called eventCreator.php to EventCreator.php in subversion and uploaded (it is a class). Everything went fine in Netbeans. In fact, I made about 10 more commits. I tried to download it on another computer, and this is the error that happens

"Can't open file
C:\xampp\htdocs\MyProject\scripts.svn\tmp\text-base\eventCreator.php.svn-base':
The system cannot find the file specified."

My repository is located at DreamHost. So i go to dreamhost and i am able to go into the scripts folder and see both eventCreator.php and EventCreator.php in the repository, yet i cannot download it with either netbeans or tortoiseSVN.
Any Help?

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

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

发布评论

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

评论(5

娇纵 2024-10-14 08:07:17

删除不需要的文件

svn del http://domain/path/to/eventCreator.php

或者您甚至可以打开repo browser(从 subversion 上下文菜单)并删除那里的文件,而无需使用无聊的控制台命令;-)

Delete not necessary file with

svn del http://domain/path/to/eventCreator.php

Or you can even open repo browser (from subversion context menu) and delete the file there, without using boring console commands ;-)

清君侧 2024-10-14 08:07:17

Subversion 1.7 现在似乎可以处理仅大小写重命名在 Windows 上。

Subversion 1.7 now appears to handle case only renames on Windows.

故事还在继续 2024-10-14 08:07:17

Subversion 区分大小写。如果你告诉它存储 20 个具有不同大小写组合的文件,它就会存储它。现在,当您从存储库中签出这些文件时,您所在的平台可能会警告您,拒绝签出(就像您的情况一样),或者只是覆盖用第二个文件写入的第一个文件的内容,第三,你明白了。

为了解决这个问题,zerkms 的答案是正确的。使用存储库浏览器或直接与服务器上的存储库配合使用的某些工具(如果需要,可以使用命令行)删除您不需要的文件的再现。

为了防止这种情况再次发生,请使用 case-insensitive.py 脚本来自预提交挂钩脚本中的 Subversion 项目。当提交添加文件时,它将检查存储库中是否已存在具有不同情况的文件。如果有,它将允许您拒绝提交,直到问题得到解决。

由于您有第三方托管您的 Subversion 存储库,如果您无法使用他们的管理工具,请联系他们以应用此挂钩。

Subversion is case sensitive. If you tell it store 20 files all with different combination of case, it'll store it. Now, when you check those files out of the repository, the platform you're on may either warn you, refuse to check out (as it did in your case), or just overwrite the content of the first file written with the second, third, you get the idea.

To resolve this, zerkms' answer is right on track. Delete the rendition of the file you don't want with a repo browser or some tool (command line if need be) that works directly with the repository on the server.

To keep this from happening again, use the case-insensitive.py script from the Subversion project in your pre-commit hook script. It'll do a check to see if there is already file in the repository with a different case when the commit is adding a file. If there is, it'll allow you to reject the commit until it's resolved.

Since you have a third party hosting your Subversion repository, contact them about getting this hook applied if you cannot do with their management tools.

鹤舞 2024-10-14 08:07:17

另一种方法是简单地将项目复制(右键单击项目上的“复制”)到新名称。这将删除 .svn 目录的所有痕迹,您可以重新提交它。但是,您还将失去之前在 SVN 中完成和提交的所有编辑的链接。

Another way is to simply Copy (right click Copy on the project) the project to the new name. This will remove all traces of .svn directory and you can re-commit it. However, you will also loose the link to all the editing that was previously done and commited in SVN.

栩栩如生 2024-10-14 08:07:17

问题不是 Subversion,而是 Windows(不,Mac 也有同样的问题,所以不要开始在这个问题上感觉高人一等——粉丝们。)

在 Windows 中,大小写被保留,但在文件名中并不重要。在 Windows 中,这些都是相同的文件:

  • myfile.txt
  • MYfile.TXT
  • MYFILE.TXT
  • MyFiLe.TxT

不幸的是,Unix(Mac 除外)既保留大小写又重要。对于 Unix,所有这些文件都是不同的文件。

当您将 Subversion 存储库存储在 Linux/Unix 主机上,但使用 Windows/Mac 客户端时,就会发生热闹的事情。 Unix Subversion 存储库将每个大小写变体作为不同的文件进行跟踪,但 PC 上的 Subversion 客户端认为它们都是相同的。有两种解决方案:

  • 使用 Linux 计算机进行签出,修复问题,然后重新签入。
  • 使用 svn delete http://.... URL 语法删除恶意内容之一副本,因此只有一个具有该名称的文件。

The issue isn't Subversion, it's Windows (and no, Macs have the same problem, so don't start feeling superior on this one -- fanboy.)

In Windows, cases are preserved, but not significant in the name of the file. In Windows, these are all the same file:

  • myfile.txt
  • MYfile.TXT
  • MYFILE.TXT
  • MyFiLe.TxT

Unfortunately, Unix (except for the Mac) is both case preserving and significant. To Unix, all of these files are different files.

Hilarity ensues when you store your Subversion repository on a Linux/Unix host, but use a Windows/Mac client. The Unix Subversion repository is tracking each variation of capitalization as a different file, but the subversion client on your PC thinks they're all the same. There are two solutions:

  • Use a Linux computer to do a checkout, fix the issue, and check it back in.
  • Use svn delete http://.... URL syntax to delete one of the miscreant copies, so there's only a single file with that name.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文