lib/tasks/add.rb in dev-2.1.28 vs lib/tasks/add.rb in dev-2.1.29

- old
+ new

@@ -8,36 +8,41 @@ if(File.exists?('.git') && File.exists?('.gitignore')) add_quiet 'git add --all' else if(defined?(SOURCE)) if(File.exists?('.svn')) + #--- + list_output = %x[svn list -R] + status_output = %x[svn status] + status_output = status_output.gsub(/\\/,"/") + #--- SOURCE.each{|f| - if(File.exists?(f) && File.file?(f)) + if(File.exists?(f) && File.file?(f) && !list_output.include?(f)) if(f.include?(' ')) - status=Command.output("svn status \"#{f}\"") - error=Command.error("svn status \"#{f}\"") - else - status=Command.output("svn status #{f}") - error=Command.error("svn status #{f}") - end - if(status.include?('?') || status.include?('was not found') || error.include?('was not found')) - if(f.include?(' ')) + status=Command.output("svn status \"#{f}\"") + error=Command.error("svn status \"#{f}\"") + else + status=Command.output("svn status #{f}") + error=Command.error("svn status #{f}") + end + if(status.include?('?') || status.include?('was not found') || error.include?('was not found')) + if(f.include?(' ')) add_quiet "svn add \"#{f}\" --parents" - else + else add_quiet "svn add #{f} --parents" - end + end end end } end if(File.exists?('.git')) SOURCE.each{|f| if(File.exists?(f) && File.file?(f)) status=Command.output("git status #{f} --short") if status.include?('??') || status.include?(' M ') - add_quiet "git add #{f} -v" + add_quiet "git add #{f} -v" end - end + end } end end end end \ No newline at end of file