summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-07-11 00:55:19 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-07-11 00:55:19 +0000
commit48f6472e0fd310d23f782a43cb735bcc209b93c7 (patch)
treedfb1d0d1ec707e7b9f630dd71fee60b597698597
parentbc5587002a76083c6c4204315f1c00e359696c0c (diff)
downloadredmine-48f6472e0fd310d23f782a43cb735bcc209b93c7.tar.gz
redmine-48f6472e0fd310d23f782a43cb735bcc209b93c7.zip
scm: mercurial: catch exception and return nil during getting info (#8777).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6245 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/scm/adapters/mercurial_adapter.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb
index c84e5d3ca..6ef816b73 100644
--- a/lib/redmine/scm/adapters/mercurial_adapter.rb
+++ b/lib/redmine/scm/adapters/mercurial_adapter.rb
@@ -95,6 +95,10 @@ module Redmine
Info.new(:root_url => CGI.unescape(summary['repository']['root']),
:lastrev => Revision.new(:revision => tip['revision'],
:scmid => tip['node']))
+ # rescue HgCommandAborted
+ rescue Exception => e
+ logger.error "hg: error during getting info: #{e.message}"
+ nil
end
def tags