From 4825bbd93bd52488b06196d747c0e54c13c62074 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 26 May 2011 06:16:44 +0000 Subject: [PATCH] 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 --- lib/redmine/scm/adapters/bazaar_adapter.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.5