summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-17 23:45:59 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-17 23:45:59 +0000
commita6368733ad221b8e042c3dbf152d948931689cb9 (patch)
tree771171b326dd63ffc12e5a49088a2cfd40a940d1 /lib
parentf230ffbd543fa0332146664525b7cf16619f6a16 (diff)
downloadredmine-a6368733ad221b8e042c3dbf152d948931689cb9.tar.gz
redmine-a6368733ad221b8e042c3dbf152d948931689cb9.zip
scm: bazaar: convert command line character encoding to @path_encoding (#11834)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10416 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/scm/adapters/bazaar_adapter.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb
index e068388e6..b6679812a 100644
--- a/lib/redmine/scm/adapters/bazaar_adapter.rb
+++ b/lib/redmine/scm/adapters/bazaar_adapter.rb
@@ -288,8 +288,13 @@ module Redmine
def scm_cmd(*args, &block)
full_args = []
full_args += args
+ full_args_locale = []
+ full_args.map do |e|
+ full_args_locale << scm_iconv(@path_encoding, 'UTF-8', e)
+ end
ret = shellout(
- self.class.sq_bin + ' ' + full_args.map { |e| shell_quote e.to_s }.join(' '),
+ self.class.sq_bin + ' ' +
+ full_args_locale.map { |e| shell_quote e.to_s }.join(' '),
&block
)
if $? && $?.exitstatus != 0
@@ -302,8 +307,13 @@ module Redmine
def scm_cmd_no_raise(*args, &block)
full_args = []
full_args += args
+ full_args_locale = []
+ full_args.map do |e|
+ full_args_locale << scm_iconv(@path_encoding, 'UTF-8', e)
+ end
ret = shellout(
- self.class.sq_bin + ' ' + full_args.map { |e| shell_quote e.to_s }.join(' '),
+ self.class.sq_bin + ' ' +
+ full_args_locale.map { |e| shell_quote e.to_s }.join(' '),
&block
)
ret