From: Marius Balteanu Date: Sun, 2 Oct 2022 07:29:20 +0000 (+0000) Subject: Merge r21880 from trunk to 5.0-stable (#37718). X-Git-Tag: 5.0.3~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=396d855807b1ac73e9ab33f625bc626f647b3f4e;p=redmine.git Merge r21880 from trunk to 5.0-stable (#37718). git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21881 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/subversion_adapter.rb b/lib/redmine/scm/adapters/subversion_adapter.rb index c3748cadf..4f213ccdb 100644 --- a/lib/redmine/scm/adapters/subversion_adapter.rb +++ b/lib/redmine/scm/adapters/subversion_adapter.rb @@ -115,7 +115,7 @@ module Redmine entries << Entry.new( { - :name => CGI.unescape(name), + :name => Addressable::URI.unescape(name), :path => ((path.empty? ? "" : "#{path}/") + name), :kind => entry['kind'], :size => ((s = entry['size']) ? s['__content__'].to_i : nil), diff --git a/test/fixtures/repositories/subversion_repository.dump.gz b/test/fixtures/repositories/subversion_repository.dump.gz index 0151f83e1..f0a1e1d2a 100644 Binary files a/test/fixtures/repositories/subversion_repository.dump.gz and b/test/fixtures/repositories/subversion_repository.dump.gz differ diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb index ca2a224a8..807c8d03f 100644 --- a/test/functional/repositories_subversion_controller_test.rb +++ b/test/functional/repositories_subversion_controller_test.rb @@ -27,7 +27,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest :issue_categories, :enumerations, :custom_fields, :custom_values, :trackers PRJ_ID = 3 - NUM_REV = 13 + NUM_REV = 14 def setup super @@ -121,9 +121,10 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest assert_response :success assert_select 'table.entries tbody' do - assert_select 'tr', 5 + assert_select 'tr', 6 assert_select 'tr.dir td.filename a', :text => '[folder_with_brackets]' assert_select 'tr.dir td.filename a', :text => 'folder' + assert_select 'tr.file td.filename a', :text => '+.md' assert_select 'tr.file td.filename a', :text => '.project' assert_select 'tr.file td.filename a', :text => 'helloworld.c' assert_select 'tr.file td.filename a', :text => 'textfile.txt' diff --git a/test/unit/repository_subversion_test.rb b/test/unit/repository_subversion_test.rb index 4ee5383bd..90ce785a2 100644 --- a/test/unit/repository_subversion_test.rb +++ b/test/unit/repository_subversion_test.rb @@ -24,7 +24,7 @@ class RepositorySubversionTest < ActiveSupport::TestCase include Redmine::I18n - NUM_REV = 13 + NUM_REV = 14 def setup User.current = nil @@ -100,7 +100,7 @@ class RepositorySubversionTest < ActiveSupport::TestCase @project.reload assert_equal NUM_REV, @repository.changesets.count - assert_equal 23, @repository.filechanges.count + assert_equal 24, @repository.filechanges.count assert_equal 'Initial import.', @repository.changesets.find_by_revision('1').comments end