From fe4159fc99d3902155ee5f1dffc9ae09fc308b8c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 4 Mar 2011 04:25:48 +0000 Subject: [PATCH] scm: mercurial: update test repository for path encoding (#2664). Mercurial (and also Git) treats file names as byte string. This mercurial test repository contains Latin-1 encoding path. Be careful on non Latin-1(CP1252) Windows. If your Windows is not Latin-1 Windows, in order to checkout(update) Latin-1 path, You need to use cygwin 1.7 and set LANG=en_US.ISO-8859-1. Please refer. http://mercurial.selenic.com/wiki/EncodingStrategy?action=recall&rev=6 Redmine mercurial adapter do not need to checkout(update) repository. Mercurial does not have "bare" repository such as Git. You can use "hg update null" for equivalent "bare" repository. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4996 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../repositories/mercurial_repository.hg | Bin 7104 -> 8902 bytes .../repositories_mercurial_controller_test.rb | 6 ++- .../scm/adapters/mercurial_adapter_test.rb | 37 +++++++++++++----- test/unit/repository_mercurial_test.rb | 14 ++++--- 4 files changed, 41 insertions(+), 16 deletions(-) diff --git a/test/fixtures/repositories/mercurial_repository.hg b/test/fixtures/repositories/mercurial_repository.hg index c06844d235c3fad69b6e85f0b743f445f01f0cee..2b4eb62410643ae3c466665bab4f63dd0e7978e6 100644 GIT binary patch literal 8902 zcmaiWRa6uV)a}q+1Cj#_Fmw+f9YYSKbazWhN~$w-J3}`^w;-L;F?0(8N=bu+ilXTM z{de8hyY5+Q?{oIk*-!f%xR$t>s+EVVILwmA*z#KA=|2FD;p>0@zuE!6V-Hm`%juaN ztfA85iPzZKMi|gZ5+W1;lu_@t#8o30>rgMm0000b0&noY1|W#ZMCH3Y6BoxAOESAY zuErGe=!83XtQ0TS9xSY2Pn|Up3&z96%f|YW;usHVw<;bIWV+-xX5O;mJTX05eKDRm z9L=dPl7nUZg=j;P4E|#mN0M6f@yd6}kJ0)7=KoeOQ~WRe?*ssN{D=SK{}pQb02pj2>SKeqlKL;|5E#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!%WzaDc_ zIQu*s*k@*%>?+t&Y})smit{n8gy*iL_UQ(&*b9kjXeV!qx`=Yi8pRUE?IOs zd5IXqzVv$XZVyJpa45^WcAddYo`>r+w1&Dgs(%K{r|%3QdKFsRCS*z&0_i^n!qgq` zc0aM-F&)X5?5 Project.find(3), :url => REPOSITORY_PATH) + @repository = Repository::Mercurial.create( + :project => Project.find(3), + :url => REPOSITORY_PATH, + :path_encoding => 'ISO-8859-1' + ) assert @repository @diff_c_support = true end diff --git a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb index d275798c..b5629841 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -10,10 +10,19 @@ begin REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/mercurial_repository' + CHAR_1_HEX = "\xc3\x9c" + if File.directory?(REPOSITORY_PATH) def setup @adapter = Redmine::Scm::Adapters::MercurialAdapter.new(REPOSITORY_PATH) @diff_c_support = true + + @tag_char_1 = "tag-#{CHAR_1_HEX}-00" + @branch_char_1 = "branch-#{CHAR_1_HEX}-00" + if @tag_char_1.respond_to?(:force_encoding) + @tag_char_1.force_encoding('UTF-8') + @branch_char_1.force_encoding('UTF-8') + end end def test_hgversion @@ -49,7 +58,7 @@ begin adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo) repo_path = adp.info.root_url.gsub(/\\/, "/") assert_equal REPOSITORY_PATH, repo_path - assert_equal '16', adp.info.lastrev.revision + assert_equal '24', adp.info.lastrev.revision assert_equal '4cddb4e45f52',adp.info.lastrev.scmid end end @@ -97,7 +106,7 @@ begin def test_diff_made_by_revision if @diff_c_support - [16, '16', '4cddb4e45f52'].each do |r1| + [24, '24', '4cddb4e45f52'].each do |r1| diff1 = @adapter.diff(nil, r1) assert_equal 5, diff1.size buf = diff1[4].gsub(/\r\n|\r|\n/, "") @@ -219,24 +228,32 @@ begin end def test_tags - assert_equal ['tag_test.00', 'tag-init-revision'], @adapter.tags + assert_equal [@tag_char_1, 'tag_test.00', 'tag-init-revision'], @adapter.tags end def test_tagmap - tm = { 'tag_test.00' => '6987191f453a', - 'tag-init-revision' => '0885933ad4f6' } + tm = { + @tag_char_1 => 'adf805632193', + 'tag_test.00' => '6987191f453a', + 'tag-init-revision' => '0885933ad4f6', + } assert_equal tm, @adapter.tagmap end def test_branches - assert_equal ['default', 'branch (1)[2]&,%.-3_4', 'test-branch-00'], - @adapter.branches + assert_equal ['default', @branch_char_1, + 'test_branch.latin-1', 'branch (1)[2]&,%.-3_4', 'test-branch-00'], + @adapter.branches end def test_branchmap - bm = { 'default' => '4cddb4e45f52', - 'branch (1)[2]&,%.-3_4' => '933ca60293d7', - 'test-branch-00' => '3a330eb32958' } + bm = { + 'default' => '4cddb4e45f52', + @branch_char_1 => 'c8d3e4887474', + 'test_branch.latin-1' => 'c2ffe7da686a', + 'branch (1)[2]&,%.-3_4' => '933ca60293d7', + 'test-branch-00' => '3a330eb32958' + } assert_equal bm, @adapter.branchmap end diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index 271ffe43..9c3032bf 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -25,7 +25,11 @@ class RepositoryMercurialTest < ActiveSupport::TestCase def setup @project = Project.find(3) - @repository = Repository::Mercurial.create(:project => @project, :url => REPOSITORY_PATH) + @repository = Repository::Mercurial.create( + :project => @project, + :url => REPOSITORY_PATH, + :path_encoding => 'ISO-8859-1' + ) assert @repository end @@ -33,8 +37,8 @@ class RepositoryMercurialTest < ActiveSupport::TestCase def test_fetch_changesets_from_scratch @repository.fetch_changesets @repository.reload - assert_equal 17, @repository.changesets.count - assert_equal 25, @repository.changes.count + assert_equal 25, @repository.changesets.count + assert_equal 32, @repository.changes.count assert_equal "Initial import.\nThe repository contains 3 files.", @repository.changesets.find_by_revision('0').comments end @@ -47,7 +51,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase assert_equal 3, @repository.changesets.count @repository.fetch_changesets - assert_equal 17, @repository.changesets.count + assert_equal 25, @repository.changesets.count end def test_isodatesec @@ -170,7 +174,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase @repository.fetch_changesets @repository.reload changesets = @repository.latest_changesets('README', nil) - assert_equal %w|8 6 1 0|, changesets.collect(&:revision) + assert_equal %w|17 8 6 1 0|, changesets.collect(&:revision) path = 'sql_escape/percent%dir/percent%file1.txt' changesets = @repository.latest_changesets(path, nil)