How to add file to svn if the filename contains "@" character (the @2x problem)
or
How to add retina images to svn
or
How to Add Those @2x iOS4 Resources to SVN
I like svn a lot, I don't like its the implementation in the Xcode, so I decided to use the command line "svn" tool to manage my repository.
For now I've choosen the Assembla servers to store my repositories, it's a good service and it is also free.
The import of my project went well, without any problems. For some days I worked without problems, since I had to add a retina image.
As usual, images for the retina display takes the same name of the images for normal displays with a suffix "@2x" before the file name extension.
So I had to add myIcon@2x.png to my reposytory, I opened the Terminal.app and inside my project I typed the following command:
$ svn add myIcon@2x.png
svn: warning: 'myIcon' not found
I tried to solve this problem in several ways:
1. Using double quotes:
$ svn add "myIcon@2x.png"
svn: warning: 'myIcon' not found
2. Using single quotes
$ svn add 'myIcon@2x.png'
svn: warning: 'myIcon' not found
3. Using the blackslashes
$ svn add myIcon\@2x.png
svn: warning: 'myIcon' not found
4. Again with backslashes
svn add \m\y\I\c\o\n\@2\x\.\p\n\g
svn: warning: 'myIcon' not found
This problem is caused by internal path recognizers in svn. SVN expects the last @ (at) symbol to specify a revision.
A simple workaround is the following: simply add a @ to the end of the filename
$ svn add myIcon@2x.png@
Really,
it works.
perfect! thanks