-
-
Save SikhNerd/922486 to your computer and use it in GitHub Desktop.
Revisions
-
meineerde created this gist
Apr 15, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ #!/path/to/redmine/script/runner Repository.all.each(&:"destroy!") This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ #!/path/to/redmine/script/runner Project.all.each do |project| # adapt the path! repo_path = "/path/to/repos/#{project.identifier}.git" unless File.exist?(repo_path) puts "+++ Skipped #{project.name} (#{project.identifier})" next end project.repository = Repository.factory('Git', :url => repo_path) if project.repository && project.repository.save puts "+++ Created #{project.name} (#{project.identifier})" else puts "--- FAILED #{project.name} (#{project.identifier})" end # Now fetch all changesets project.repository.fetch_changesets end