From: Toshi MARUYAMA Date: Thu, 26 May 2011 06:16:44 +0000 (+0000) Subject: scm: bazaar: refactor adapter diff to use scm_cmd_no_raise(). X-Git-Tag: 1.3.0~1926 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4825bbd93bd52488b06196d747c0e54c13c62074;p=redmine.git scm: bazaar: refactor adapter diff to use scm_cmd_no_raise(). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5923 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb index 39de200f3..97c1e322d 100644 --- a/lib/redmine/scm/adapters/bazaar_adapter.rb +++ b/lib/redmine/scm/adapters/bazaar_adapter.rb @@ -174,14 +174,15 @@ module Redmine if identifier_from identifier_from = identifier_from.to_i end - cmd = "#{self.class.sq_bin} diff -r#{identifier_to}..#{identifier_from} #{target(path)}" diff = [] - shellout(cmd) do |io| + cmd_args = %w|diff| + cmd_args << "-r#{identifier_to}..#{identifier_from}" + cmd_args << bzr_target(path) + scm_cmd_no_raise(*cmd_args) do |io| io.each_line do |line| diff << line end end - #return nil if $? && $?.exitstatus != 0 diff end