scm: cvs: convert encoding of command line arguments (#3462).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5462 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-15 07:16:04 +00:00
parent eae0620e3a
commit 991d39a9ac
1 changed files with 5 additions and 1 deletions

View File

@ -373,7 +373,11 @@ module Redmine
def scm_cmd(*args, &block)
full_args = [CVS_BIN, '-d', root_url]
full_args += args
ret = shellout(full_args.map { |e| shell_quote e.to_s }.join(' '), &block)
full_args_locale = []
full_args.map do |e|
full_args_locale << scm_iconv(@path_encoding, 'UTF-8', e)
end
ret = shellout(full_args_locale.map { |e| shell_quote e.to_s }.join(' '), &block)
if $? && $?.exitstatus != 0
raise ScmCommandAborted, "cvs exited with non-zero status: #{$?.exitstatus}"
end