-
-
Save SikhNerd/922486 to your computer and use it in GitHub Desktop.
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 characters
#!/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 characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment