lib/knj/scripts/svn_merge.rb in knjrbfw-0.0.8 vs lib/knj/scripts/svn_merge.rb in knjrbfw-0.0.9

- old
+ new

@@ -3,27 +3,27 @@ require "knj/autoload" path_to = ARGV[0] Dir.glob(File.join("**", ".svn")).each do |dir| - newdir = path_to + "/" + dir - - #print dir + "\n" - #print newdir + "\n" - - if File.exists?(newdir) - print "Remove: " + newdir.to_s + "\n" - FileUtils.rm_r(newdir) - end - - begin - #print "Move: " + dir + "\n" - #FileUtils.mv(dir, newdir) - - print "Copy: " + dir + "\n" - FileUtils.cp_r(dir, newdir) - rescue => e - print "Failed: " + e.message + "\n" - end - - #print "\n" + newdir = path_to + "/" + dir + + #print dir + "\n" + #print newdir + "\n" + + if File.exists?(newdir) + print "Remove: " + newdir.to_s + "\n" + FileUtils.rm_r(newdir) + end + + begin + #print "Move: " + dir + "\n" + #FileUtils.mv(dir, newdir) + + print "Copy: " + dir + "\n" + FileUtils.cp_r(dir, newdir) + rescue => e + print "Failed: " + e.message + "\n" + end + + #print "\n" end \ No newline at end of file