]> source.dussan.org Git - redmine.git/commitdiff
scm: catch CommandFailed during bulk Repository.fetch_changesets (#4455).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 15 Feb 2011 02:12:19 +0000 (02:12 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 15 Feb 2011 02:12:19 +0000 (02:12 +0000)
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4824 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository.rb

index 1fbcf5f56dd32427cdf26dedeac5ea0f3b068293..4ddc73432bce448b6a3d3a926f7abb6df64c2db8 100644 (file)
@@ -184,7 +184,11 @@ class Repository < ActiveRecord::Base
   def self.fetch_changesets
     Project.active.has_module(:repository).find(:all, :include => :repository).each do |project|
       if project.repository
-        project.repository.fetch_changesets
+        begin
+          project.repository.fetch_changesets
+        rescue Redmine::Scm::Adapters::CommandFailed => e
+          logger.error "Repository: error during fetching changesets: #{e.message}"
+        end
       end
     end
   end