2

I use this to add all unversioned files to SVN:

svn status |grep '\?' |awk '{print $2}'| xargs svn add

However it doesn't include files with an "@2x" suffix.

How would I modify the line above to include "@2x" files in the SVN add?

timkl
  • 3,299
  • 12
  • 57
  • 71
  • 1
    Apache Subversion interprets '@' as a peg revision specifier. See http://stackoverflow.com/questions/757435/how-to-escape-characters-in-subversion-managed-file-names for further details and please also consider the following SVNBook chapter: http://svnbook.red-bean.com/en/1.7/svn.advanced.pegrevs.html – bahrep Oct 15 '12 at 12:38
  • see http://stackoverflow.com/questions/1218237/subversion-add-all-unversioned-files-to-subversion-using-one-linux-command svn add --force – user1688936 Oct 15 '12 at 12:39
  • @user1688936 does it really solve the issue with the peg revision specifier? – bahrep Oct 15 '12 at 12:44
  • Did my answer help you in 2012? Please, upvote and accept it then. :) – bahrep Feb 15 '19 at 14:28

1 Answers1

0

Apache Subversion interprets the "at sign" ('@') as a peg revision specifier and it seems to be the cause here. I advise you to check the StackOverflow thread discussing the case when you have file or folders with '@' sign in it's name.

According to the SVNBook you can customize your command to append '@@' to the end of the path you pipe to svn add in order to workaround the issue. E.g. the following answer should help you: https://stackoverflow.com/a/12292498/761095.

The perceptive reader is probably wondering at this point whether the peg revision syntax causes problems for working copy paths or URLs that actually have at signs in them. After all, how does svn know whether news@11 is the name of a directory in my tree or just a syntax for “revision 11 of news”? Thankfully, while svn will always assume the latter, there is a trivial workaround. You need only append an at sign to the end of the path, such as news@11@. svn cares only about the last at sign in the argument, and it is not considered illegal to omit a literal peg revision specifier after that at sign. This workaround even applies to paths that end in an at sign—you would use filename@@ to talk about a file named filename@.

Community
  • 1
  • 1
bahrep
  • 29,961
  • 12
  • 103
  • 150