From 991d39a9acca6e5c0e46dc6ac786fb188d82064c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 15 Apr 2011 07:16:04 +0000 Subject: [PATCH] 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 --- lib/redmine/scm/adapters/cvs_adapter.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 7c1e3066e..73a1c2c3b 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -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