From: Toshi MARUYAMA Date: Mon, 7 Mar 2011 13:46:21 +0000 (+0000) Subject: scm: git: backout r5026 (#5251). X-Git-Tag: 1.2.0~813 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5d9962751c195e19b5146c83012d8a3ad59e4d1c;p=redmine.git scm: git: backout r5026 (#5251). In case git repository contains latin-1 path, although Redmine uses "git log -C core.quotepath=false --encoding=UTF-8", log encoding is latin-1. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5027 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/fixtures/repositories/git_repository.tar.gz b/test/fixtures/repositories/git_repository.tar.gz index fa4a6fb58..448f11d2d 100644 Binary files a/test/fixtures/repositories/git_repository.tar.gz and b/test/fixtures/repositories/git_repository.tar.gz differ diff --git a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb index 770348506..ba8d3f69c 100644 --- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb @@ -28,12 +28,11 @@ begin end def test_branches - assert_equal ['latin-1-path-encoding', 'master', 'test-latin-1', 'test_branch'], - @adapter.branches + assert_equal @adapter.branches, ['master', 'test-latin-1', 'test_branch'] end def test_getting_all_revisions - assert_equal 21, @adapter.revisions('',nil,nil,:all => true).length + assert_equal 16, @adapter.revisions('',nil,nil,:all => true).length end def test_getting_certain_revisions diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 935f3b751..c6e2d8372 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -38,8 +38,8 @@ class RepositoryGitTest < ActiveSupport::TestCase @repository.fetch_changesets @repository.reload - assert_equal 21, @repository.changesets.count - assert_equal 31, @repository.changes.count + assert_equal 16, @repository.changesets.count + assert_equal 25, @repository.changes.count commit = @repository.changesets.find(:first, :order => 'committed_on ASC') assert_equal "Initial import.\nThe repository contains 3 files.", commit.comments @@ -59,7 +59,7 @@ class RepositoryGitTest < ActiveSupport::TestCase def test_fetch_changesets_incremental @repository.fetch_changesets # Remove the 3 latest changesets - @repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 8).each(&:destroy) + @repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 3).each(&:destroy) @repository.reload cs1 = @repository.changesets assert_equal 13, cs1.count @@ -74,7 +74,7 @@ class RepositoryGitTest < ActiveSupport::TestCase assert_equal rev_a_committed_on, latest_rev.committed_on @repository.fetch_changesets - assert_equal 21, @repository.changesets.count + assert_equal 16, @repository.changesets.count end def test_find_changeset_by_name