]> source.dussan.org Git - redmine.git/commitdiff
scm: bazaar: convert command line character encoding to @path_encoding (#11834)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 17 Sep 2012 23:45:59 +0000 (23:45 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 17 Sep 2012 23:45:59 +0000 (23:45 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10416 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/bazaar_adapter.rb

index e068388e62698391987e3a91b1b6768e82cf305a..b6679812a15b8c51c507fd8eafcc9bba54b4ab89 100644 (file)
@@ -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