Cooked this one up this morning… It will iterate through `svn st | grep \?` and ask for confirmation before adding to your subversion project. Of course, all the cool kids are using git these days anyways ;) Shouldn’t be hard to modify for that.

UPDATE: actually, there is no need for such a task with git. You can just use “git commit -a”.


namespace :svn do

  desc "Add files not under (sub)version control" 
  task :add do
    files = `svn st | grep \?`.map{|f| f.gsub(/\?\s+(.+)\n/){$1} }
    puts "No new files to add." and return if files.empty?
    files.each do |file|
      print "... #{file} [Yn]" 
     `svn add #{file}` unless STDIN.gets =~ /^n/i
    end
  end

end

actionmailer ActionView ActiveRecord activesupport agile ajax alphadecimal audio autotest BDD blocks capistrano ssh ruby console controller css dashboard widget delegate dog puppy naming name DRM email obfuscation exceptions factories factories-and-workers factory pattern filemerge find and replace finder fink fixtures fun functional testing gem git google maps haml helper helpers imagemagick Intertrust irb javascript jquery jrails logo macro math meetup model openssl OS X patch Pioneer Electronics plugin polymorphism project management prototype.js rails rails gotcha rails,patch,validations railsconf rake rmagick RSA encryption ruby ruby on rails script scrum scrum lessons rails scrumninja shoulda subversion SyncTV TDD testing textmate tips tricks unique hashes unix shell validation view yaml zebra stripes