From: Toshi MARUYAMA Date: Wed, 5 Jan 2011 15:10:58 +0000 (+0000) Subject: Merged r4633 from trunk. X-Git-Tag: 1.1.0~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9f7cc355ada6afb7e0278782e23fff437630ba83;p=redmine.git Merged r4633 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@4639 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/mercurial/hg-template-0.9.5.tmpl b/lib/redmine/scm/adapters/mercurial/hg-template-0.9.5.tmpl index b3029e6ff..3cf584aed 100644 --- a/lib/redmine/scm/adapters/mercurial/hg-template-0.9.5.tmpl +++ b/lib/redmine/scm/adapters/mercurial/hg-template-0.9.5.tmpl @@ -3,10 +3,10 @@ changeset_quiet = 'This template must be used with --debug option\n' changeset_verbose = 'This template must be used with --debug option\n' changeset_debug = '\n{author|escape}\n{date|isodate}\n\n{files}{file_adds}{file_dels}{file_copies}\n{desc|escape}\n{tags}\n\n' -file = '{file|escape}\n' -file_add = '{file_add|escape}\n' -file_del = '{file_del|escape}\n' -file_copy = '{name|urlescape}\n' +file = '{file|urlescape}\n' +file_add = '{file_add|urlescape}\n' +file_del = '{file_del|urlescape}\n' +file_copy = '{name|urlescape}\n' tag = '{tag|escape}\n' header='\n\n\n' # footer="" \ No newline at end of file diff --git a/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl b/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl index b6cc7a786..def80c262 100644 --- a/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl +++ b/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl @@ -3,10 +3,10 @@ changeset_quiet = 'This template must be used with --debug option\n' changeset_verbose = 'This template must be used with --debug option\n' changeset_debug = '\n{author|escape}\n{date|isodatesec}\n\n{file_mods}{file_adds}{file_dels}{file_copies}\n{desc|escape}\n{tags}\n\n' -file_mod = '{file_mod|escape}\n' -file_add = '{file_add|escape}\n' -file_del = '{file_del|escape}\n' -file_copy = '{name|urlescape}\n' +file_mod = '{file_mod|urlescape}\n' +file_add = '{file_add|urlescape}\n' +file_del = '{file_del|urlescape}\n' +file_copy = '{name|urlescape}\n' tag = '{tag|escape}\n' header='\n\n\n' # footer="" diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 72dc5dd25..be755419f 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -16,6 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. require 'redmine/scm/adapters/abstract_adapter' +require 'cgi' module Redmine module Scm @@ -127,8 +128,8 @@ module Redmine from_rev = logentry.attributes['revision'] end paths << {:action => path.attributes['action'], - :path => "/#{path.text}", - :from_path => from_path ? "/#{from_path}" : nil, + :path => "/#{CGI.unescape(path.text)}", + :from_path => from_path ? "/#{CGI.unescape(from_path)}" : nil, :from_revision => from_rev ? from_rev : nil } end