I've been doing a lot of Ruby on Rails dev work lately, and the framework tends to generate a lot of files. Until recently, I was using a combination of "svn status" piped into grep, awk, and xargs to accomplish adding new files recursively. A friend recently told me to check out the following solution instead.
svn --force add *
The only negative side effect I can see is that it seems to add ignored files back into the tree. This is mostly a non-issue for me, but take note.
Monday, August 11, 2008
Subscribe to:
Post Comments (Atom)
3 comments:
This way you don't add ignored files...
http://www.gregwhitescarver.com/blog/2006/05/22/add-multiple-files-in-subversion-at-once/
Subversion 1.5 has sparse checkouts, so you don't get repository content you don't explicitly want, but can still have an entire tree checked out.
#!/bin/bash
svn st | grep '^\?' | awk '{print $2}' | xargs svn add
svn st | grep '^\!' | awk '{print $2}' | xargs svn rm
Post a Comment