]> source.dussan.org Git - redmine.git/commitdiff
Merged r6245 from trunk.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 11 Jul 2011 02:08:03 +0000 (02:08 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 11 Jul 2011 02:08:03 +0000 (02:08 +0000)
scm: mercurial: catch exception and return nil during getting info.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.2-stable@6253 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/mercurial_adapter.rb

index c84e5d3ca7ff3988c4dea9123daadae1a0377e11..6ef816b7342d48a62ac49a1df741549551571465 100644 (file)
@@ -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