Skip to content

Commit

Permalink
Add list_directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerian committed Oct 22, 2010
1 parent c818992 commit b49456e
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions lib/conversor.rb
Expand Up @@ -94,7 +94,7 @@ def perform_conversion_operations(revision_number_that_we_want_to_copy_to_destin

list_of_files_that_should_be_removed.each do |name|
puts "file #{name} was removed"
#system("rm -Rf #{name}")
system("rm -Rf #{name}")
end

puts "\n--> Done removing files.\n"
Expand All @@ -118,10 +118,17 @@ def perform_conversion_operations(revision_number_that_we_want_to_copy_to_destin
system("cp -Rf "+file_path_origin+" "+file_path_destiny)
end
end
puts "\n--> End copying files\n"
puts "\n--> End copying files\n"

puts "\n\n ======= Current origin schema ======\n"
list_directory("/tmp/#{svn_origin_name}")
puts "\n\n ======= Current destiny schema ======\n"
list_directory("/tmp/#{svn_destiny_name}")



puts "\n--> We start copy and write process "
system("cd /tmp/"+@svn_destiny_name +" && "+"svn add * --force"+" && svn commit -m '"+revision_number_that_we_want_to_copy_to_destiny+"'"+ " && "+"svn update")
system("cd /tmp/"+@svn_destiny_name +" && "+"svn add * "+" && svn commit -m '"+revision_number_that_we_want_to_copy_to_destiny+"'"+ " && "+"svn update")
puts "\n-->End copy and paste process\n"

end
Expand All @@ -144,6 +151,12 @@ def repo_online_revision(repo)
revision = /\d+/.match(revision_line).to_s
puts revision
revision
end

def list_directory(directory)
Dir.glob("#{directory}/**") do |filename|
puts filename
end
end

end
Expand Down

0 comments on commit b49456e

Please sign in to comment.