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

Sorry, comments are closed for this article.