##// END OF EJS Templates
Fixed: Repository.fetch_changesets tries to fetch changesets for archived projects (#4782)....
Jean-Philippe Lang -
r3288:d04d3f181a7d
parent child
Show More
@@ -159,11 +159,15 class Repository < ActiveRecord::Base
159 end
159 end
160 end
160 end
161
161
162 # fetch new changesets for all repositories
162 # Fetches new changesets for all repositories of active projects
163 # can be called periodically by an external script
163 # Can be called periodically by an external script
164 # eg. ruby script/runner "Repository.fetch_changesets"
164 # eg. ruby script/runner "Repository.fetch_changesets"
165 def self.fetch_changesets
165 def self.fetch_changesets
166 find(:all).each(&:fetch_changesets)
166 Project.active.has_module(:repository).find(:all, :include => :repository).each do |project|
167 if project.repository
168 project.repository.fetch_changesets
169 end
170 end
167 end
171 end
168
172
169 # scan changeset comments to find related and fixed issues for all repositories
173 # scan changeset comments to find related and fixed issues for all repositories
General Comments 0
You need to be logged in to leave comments. Login now