Posted By

dividespace on 06/03/09


Tagged

svn add


Versions (?)

Add all new files to svn repository


 / Published in: SVN
 

URL: http://codesnippets.joyent.com/posts/show/45

  1. Whippy posts on May 15, 2009 at 07:04
  2. To get the 'A' status, the file must already be added. You need to match a '?'. Here is what I use:
  3.  
  4. svn status | grep -v "^.[ \t]*\..*" | grep "^?" | awk '{print $2}' | xargs svn add
  5. svn commit
  6.  
  7. The first grep gets rid of any hidden files (which may be present if you use IDEs such as Zend studio).
  8. The second grep makes sure you only get files that are currently of unknown status (ie the new ones).
  9. awk grabs the file names.
  10. xargs passes the file names as parameters to svn add.

Report this snippet  

You need to login to post a comment.