diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index a71ae7bd2e..683a5731f1 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -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