Commit d04d3f18 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixed: Repository.fetch_changesets tries to fetch changesets for archived projects (#4782).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3402 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent f50feca7
......@@ -159,11 +159,15 @@ class Repository < ActiveRecord::Base
end
end
# fetch new changesets for all repositories
# can be called periodically by an external script
# Fetches new changesets for all repositories of active projects
# Can be called periodically by an external script
# eg. ruby script/runner "Repository.fetch_changesets"
def self.fetch_changesets
find(:all).each(&:fetch_changesets)
Project.active.has_module(:repository).find(:all, :include => :repository).each do |project|
if project.repository
project.repository.fetch_changesets
end
end
end
# scan changeset comments to find related and fixed issues for all repositories
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment