From: Toshi MARUYAMA Date: Wed, 25 May 2011 23:51:44 +0000 (+0000) Subject: scm: bazaar: refactor adapter info() to use scm_cmd(). X-Git-Tag: 1.3.0~1941 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=39a245e9eed360d7fec64971b1cbbc2fce0e8a33;p=redmine.git scm: bazaar: refactor adapter info() to use scm_cmd(). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5908 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb index 2fc78cf0f..2710899d7 100644 --- a/lib/redmine/scm/adapters/bazaar_adapter.rb +++ b/lib/redmine/scm/adapters/bazaar_adapter.rb @@ -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