summaryrefslogtreecommitdiffstats
path: root/app/models/repository.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-02-15 02:12:19 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-02-15 02:12:19 +0000
commit60d80653ba4b063af233e497231e2cfe9f6ff9a0 (patch)
tree46848805c0a1135e6f854714f73e16a954eeb9bb /app/models/repository.rb
parent9c1db1e545cc1ade92f4765dfb2eae48f1de5ec7 (diff)
downloadredmine-60d80653ba4b063af233e497231e2cfe9f6ff9a0.tar.gz
redmine-60d80653ba4b063af233e497231e2cfe9f6ff9a0.zip
scm: catch CommandFailed during bulk Repository.fetch_changesets (#4455).
Contributed by Yuya Nishihara. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4824 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 1fbcf5f56..4ddc73432 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -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