开发者

How do I configure Subversion to work with URL-encoded characters?

I'm trying to check out a Subver开发者_Python百科sion 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜