]> source.dussan.org Git - redmine.git/commitdiff
scm: bazaar: refactor adapter info() to use scm_cmd().
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 25 May 2011 23:51:44 +0000 (23:51 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 25 May 2011 23:51:44 +0000 (23:51 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5908 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/bazaar_adapter.rb

index 2fc78cf0f036451308e796b7d27e70bc93ff54ad..2710899d7a0907af7e3820460ec17c606c58e73b 100644 (file)
@@ -59,9 +59,10 @@ module Redmine
 
         # Get info about the repository
         def info
-          cmd = "#{self.class.sq_bin} revno #{target('')}"
+          cmd_args = %w|revno|
+          cmd_args << bzr_target('')
           info = nil
-          shellout(cmd) do |io|
+          scm_cmd(*cmd_args) do |io|
             if io.read =~ %r{^(\d+)\r?$}
               info = Info.new({:root_url => url,
                                :lastrev => Revision.new({
@@ -70,9 +71,8 @@ module Redmine
                              })
             end
           end
-          return nil if $? && $?.exitstatus != 0
           info
-        rescue CommandFailed
+        rescue ScmCommandAborted
           return nil
         end