Skip to content

July 10, 2010

5

Dealing with Special Characters in iPhone 4 Graphics Filenames with Subversion

With the iPhone 4’s high-resolution screen, designers need to create two sets of art; the guidelines are to name the files like so: SomeCoolImage.png and SomeCoolImage@2x.png. Unfortunately, if you try to add these files to an SVN repository, the @ symbol throws them off:

$ svn add Icon\@2x~iphone.png
svn: warning: 'Icon' not found

The fix, thanks to the subversion_users Google Group, is to add another @ to the end of the filename, like so:

$ svn add ./Icon\@2x~iphone.png@
A  (bin)  Icon@2x~iphone.png

If you’d like to do this for all of your high-resolution art in a folder, here’s a tiny Bash command for the task:

for x in `ls *\@*`; do svn add $x\@; done
5 Comments
  1. Anonymous
    Aug 25 2010

    I found this on another site; thought I’d post it here.

    svn add Icon\@2x~iphone.png
    should be
    svn add ‘Icon\@2x~iphone.png’@HEAD

    • Aug 25 2010

      What I wrote works for me. Perhaps this depends on your SVN configuration, the shell you’re using (I’m using Bash), etc.…

  2. Ingo Guenther
    Nov 5 2010

    Worked out of the box! :)
    Thanks a lot for sharing this!

  3. Nov 17 2010

    This has been driving me nuts! Thanks for posting!

    -Ralph

  4. Sep 20 2011

    Thanks for posting. Works well.

Comments are closed.