]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: path encoding support for "cat" in adapter (#2664).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 23 Feb 2011 00:34:27 +0000 (00:34 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 23 Feb 2011 00:34:27 +0000 (00:34 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4928 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/mercurial_adapter.rb

index a71ae7bd2edd2f3cc277189682c36caff848caba..683a5731f1d2796a77f4004816ca60ecccfd39ea 100644 (file)
@@ -228,7 +228,8 @@ module Redmine
         end
 
         def cat(path, identifier=nil)
-          hg 'cat', '-r', hgrev(identifier), hgtarget(path) do |io|
+          p = CGI.escape(scm_iconv(@path_encoding, 'UTF-8', path))
+          hg 'rhcat', '-r', hgrev(identifier), hgtarget(p) do |io|
             io.binmode
             io.read
           end