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
This commit is contained in:
Toshi MARUYAMA 2011-05-26 06:16:44 +00:00
parent 2598f0fdeb
commit 4825bbd93b
1 changed files with 4 additions and 3 deletions

View File

@ -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