0

In Mac and iOS development it is common to have files that contain the @ sign (e.g. MyImage@2x.png).

If you want to check these kinds of files into a Subversion repository, it won't work:

% svn add MyImage.png
A  (bin)  MyImage.png
% svn add MyImage@2x.png
svn: warning: 'MyImage' not found

How can these files be added to svn repositories?

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Kevin Grant
  • 5,363
  • 1
  • 21
  • 24

1 Answers1

1

If a file name contains @, Subversion expects it to be followed by a revision number. Fortunately this is only enforced for the last @ in the file name so the solution is to add a 2nd @:

% svn add MyImage@2x.png@
A  (bin)  MyImage@2x.png

This is actually a problem for any svn command, not just svn add. For instance, this fails...

% svn status MyImage@2x.png
svn: syntax error parsing revision '2x.png'

...and the extra @ works just as well to fix it:

% svn status MyImage@2x.png@
Path: MyImage@2x.png
Name: MyImage@2x.png
URL: . . .
Kevin Grant
  • 5,363
  • 1
  • 21
  • 24