migrate repost +debug fixes

This commit is contained in:
Timothy N. Tsvetkov 2011-04-27 18:55:23 +04:00
parent de735f9637
commit 32a4fae18a
1 changed files with 4 additions and 8 deletions

View File

@ -2,20 +2,16 @@ namespace :repositories do
desc "Migrate repositories from fs"
task :migrate => :environment do
puts "Hello, doing haha"
repos_dirs = Dir["/root/mandriva_main_git/*.git"]
puts repos_dirs.inspect
repo_dirs = Dir["/root/mandriva_main_git/*.git"]
cooker = Platform.find_by_name!("cooker")
main = cooker.repositories.find_by_name!("main")
repos_dirs.each do |repo_dir|
repo_dirs.each do |repo_dir|
puts repo_dir
puts File.basename(repos_dir, ".git")
project_name = File.basename(repos_dir, ".git")
puts project_name
# main.projects.create(:name => project_name, :unixname => project_name)
# Dir