From 71360a0f66ce34c34f36cfe8f7088b2de3a6542e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 11 Apr 2011 05:53:35 +0000 Subject: [PATCH] scm: cvs: use scm_cmd() for diff. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5393 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/cvs_adapter.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index d85c9e231..de8f65e35 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -275,15 +275,19 @@ module Redmine logger.debug " diff path:'#{path}'" + ",identifier_from #{identifier_from}, identifier_to #{identifier_to}" path_with_project="#{url}#{with_leading_slash(path)}" - cmd = "#{self.class.sq_bin} -d #{shell_quote root_url} rdiff -u -r#{identifier_to} -r#{identifier_from} #{shell_quote path_with_project}" + cmd_args = %w|rdiff -u| + cmd_args << "-r#{identifier_to}" + cmd_args << "-r#{identifier_from}" + cmd_args << path_with_project diff = [] - shellout(cmd) do |io| + scm_cmd(*cmd_args) do |io| io.each_line do |line| diff << line end end - return nil if $? && $?.exitstatus != 0 diff + rescue ScmCommandAborted + nil end def cat(path, identifier=nil) -- 2.39.5