From: Toshi MARUYAMA Date: Wed, 26 Feb 2014 13:01:43 +0000 (+0000) Subject: Merged r12929 from trunk to 2.5-stable (#16177) X-Git-Tag: 2.5.0~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=41667cd5deeffaccf83141b12d25872ccabb1ea1;p=redmine.git Merged r12929 from trunk to 2.5-stable (#16177) scm: mercurial: add one "closed" branch to test repository. git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@12931 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/fixtures/repositories/mercurial_repository.hg b/test/fixtures/repositories/mercurial_repository.hg index 0b621e724..751f44f99 100644 Binary files a/test/fixtures/repositories/mercurial_repository.hg and b/test/fixtures/repositories/mercurial_repository.hg differ diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb index 6b1231f07..8eec4f3de 100644 --- a/test/functional/repositories_mercurial_controller_test.rb +++ b/test/functional/repositories_mercurial_controller_test.rb @@ -26,7 +26,7 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s CHAR_1_HEX = "\xc3\x9c" PRJ_ID = 3 - NUM_REV = 32 + NUM_REV = 34 ruby19_non_utf8_pass = (RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8') 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 40db389cb..7f062d1f1 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -89,8 +89,8 @@ begin adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo) repo_path = adp.info.root_url.gsub(/\\/, "/") assert_equal REPOSITORY_PATH, repo_path - assert_equal '31', adp.info.lastrev.revision - assert_equal '31eeee7395c8c78e66dd54c50addd078d10b2355',adp.info.lastrev.scmid + assert_equal '33', adp.info.lastrev.revision + assert_equal '2e6d546429230f377d7d19c2078abd2dd909f235',adp.info.lastrev.scmid end end diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index 953986edb..9762e47a9 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -23,7 +23,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase include Redmine::I18n REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s - NUM_REV = 32 + NUM_REV = 34 CHAR_1_HEX = "\xc3\x9c" def setup @@ -263,7 +263,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase # with_limit changesets = @repository.latest_changesets('', nil, 2) - assert_equal %w|31 30|, changesets.collect(&:revision) + assert_equal ["#{NUM_REV - 1}", "#{NUM_REV - 2}"], changesets.collect(&:revision) # with_filepath changesets = @repository.latest_changesets( @@ -600,7 +600,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase @repository.fetch_changesets @project.reload assert_equal NUM_REV, @repository.changesets.count - %w|31 31eeee7395c8 31eee|.each do |r1| + ["#{NUM_REV - 1}", "2e6d54642923", "2e6d5"].each do |r1| changeset = @repository.find_changeset_by_name(r1) assert_nil changeset.next end