Sha256: e294a2856ae79d30586d2852d688d621b4bcf90915a154c61c39a8384b7a2b7f

Contents?: true

Size: 925 Bytes

Versions: 2

Compression:

Stored size: 925 Bytes

Contents

#!/usr/bin/env ruby
require 'find'

Find.find(ARGV[0]) do |path|
  if FileTest.directory?(path)
    if File.basename(path)[0] == ?.   # Don't look in directories beginning with .
      Find.prune       # Don't look any further into this directory.
    else
      ext = `svn pg svn:externals #{path} 2>&1`.strip
      next if ext =~ /not under version control/
      next if ext =~ /not a working copy/
      next if path =~ /plugins\//
      if ext.size > 0 and ext =~ /_tasks/
        puts "-"*80
        puts path
        puts ext
        
#        puts "svn up #{path}"
#        puts `svn up #{path}`
#        puts "svn pe svn:externals #{path}"
#        exec "svn pe svn:externals #{path}" if fork.nil?
#        Process.wait
#        puts `svn up #{path}`
#        puts "svn ci #{path} -m \"Fixing svn:externals\""
#        puts `svn ci #{path} -m \"Fixing svn:externals\"`
      end
      
      next
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
svn-command-0.0.7 bin/change_all_externals.rb
svn-command-0.0.8 bin/change_all_externals.rb