如何配置 Subversion 以使用 URL 编码字符?

发布于 2024-10-13 04:24:19 字数 532 浏览 3 评论 0原文

我正在尝试查看我在远程服务器上设置的 Subversion 项目。它适用于大多数目录,但是一旦需要查看名为“The%20Loft.pdf”的文件,整个过程就会中断。看起来它无法为其创建“/.svn/tmp/text-base/”文件。我的猜测是 %20 字符有问题。

错误实际上是: svn:无法打开文件“src-holdings/httpdocs/wp-content/blogs.dir/2/files/2010/05/.svn/tmp/text-base/Amanda-Kuda.jpg.svn-base”:没有这样的文件或目录

其中“Amanda-Kuda.jpg”是“The%20Loft.pdf”后面的文件。看了里面之后 “/.svn/tmp/text-base/”,看起来所有 .svn-base 文件都已创建,除了那些在结账顺序中遵循“The%20Loft.pdf”的文件。

如何重新配置​​我的服务器 (Linux) 或 Subversion 以在不中断的情况下处理此类文件?我只会强制执行“无空格”策略,但这是客户端的 WordPress 安装,我不能指望它们避免包含空格的文件。

I'm trying to check out a Subversion project that I've set up on a remote server. It works fine for most directories, however once it come time to check out a file called "The%20Loft.pdf", the whole process breaks. It looks like it's not able to create the "/.svn/tmp/text-base/" file for it. My guess is that it's having trouble with the %20 character.

The errors is actually:
svn: Can't open file 'src-holdings/httpdocs/wp-content/blogs.dir/2/files/2010/05/.svn/tmp/text-base/Amanda-Kuda.jpg.svn-base': No such file or directory

Where "Amanda-Kuda.jpg" is the file that follows "The%20Loft.pdf". After looking inside of
"/.svn/tmp/text-base/", it looks like all the .svn-base files are getting created except those that follow "The%20Loft.pdf" in checkout order.

How can I reconfigure my server (Linux) or Subversion to handle this type of file without breaking? I would just enforce a "no-spaces" policy, but it's a client's WordPress installation, and I can't count on them to avoid files with spaces.

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

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

发布评论

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

评论(1

挖鼻大婶 2024-10-20 04:24:19

我的 Windows 盒子上的以下会话演示了 Subversion 对于包含空格或“%20”的文件名没有问题:

D:\svn>svnadmin create testrepo  

D:\svn>mkdir files

D:\svn>echo content > "files\foo bar"

D:\svn>echo content > "files\foo%20bar"

D:\svn>svn import files file:///d:/svn/testrepo -m "imported files"
Adding         files\foo%20bar
Adding         files\foo bar

Committed revision 1.

D:\svn>svn co file:///d:/svn/testrepo/ checkoutfolder
A    checkoutfolder\foo%20bar
A    checkoutfolder\foo bar
Checked out revision 1.

编辑:从 此线程 关于相同的错误消息,您的存储库中有两个文件具有相同的名称,仅大小写不同。这会导致问题,因为您的本地文件系统不支持此功能。

要验证这一点,您可以使用 svn ls 命令检查存储库中的文件名,或者在 Linux 上进行签出。要解决此问题,您可以使用 svn mv 命令重命名有问题的文件之一,或使用 svn rm 删除其中一个。

The following session on my windows box demonstrates that subversion has no problem with filenames containing spaces or "%20":

D:\svn>svnadmin create testrepo  

D:\svn>mkdir files

D:\svn>echo content > "files\foo bar"

D:\svn>echo content > "files\foo%20bar"

D:\svn>svn import files file:///d:/svn/testrepo -m "imported files"
Adding         files\foo%20bar
Adding         files\foo bar

Committed revision 1.

D:\svn>svn co file:///d:/svn/testrepo/ checkoutfolder
A    checkoutfolder\foo%20bar
A    checkoutfolder\foo bar
Checked out revision 1.

edit: Judging from this thread about the same error message, you have two files in your repository with the same name differing only by case. This causes problems because your local file system does not support this.

To verify this, you can use the svn ls command to inspect the file names in the repository, or do a checkout on linux. To fix this, you use svn mv command to rename one of the offending files or svn rm to remove one.

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