##// END OF EJS Templates
Merged r12929 from trunk to 2.4-stable (#16177)...
Toshi MARUYAMA -
r12658:5e031bce4703
parent child
Show More
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -26,7 +26,7 class RepositoriesMercurialControllerTest < ActionController::TestCase
26 REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
26 REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
27 CHAR_1_HEX = "\xc3\x9c"
27 CHAR_1_HEX = "\xc3\x9c"
28 PRJ_ID = 3
28 PRJ_ID = 3
29 NUM_REV = 32
29 NUM_REV = 34
30
30
31 ruby19_non_utf8_pass =
31 ruby19_non_utf8_pass =
32 (RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8')
32 (RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8')
@@ -89,8 +89,8 begin
89 adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo)
89 adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo)
90 repo_path = adp.info.root_url.gsub(/\\/, "/")
90 repo_path = adp.info.root_url.gsub(/\\/, "/")
91 assert_equal REPOSITORY_PATH, repo_path
91 assert_equal REPOSITORY_PATH, repo_path
92 assert_equal '31', adp.info.lastrev.revision
92 assert_equal '33', adp.info.lastrev.revision
93 assert_equal '31eeee7395c8',adp.info.lastrev.scmid
93 assert_equal '2e6d54642923',adp.info.lastrev.scmid
94 end
94 end
95 end
95 end
96
96
@@ -23,7 +23,7 class RepositoryMercurialTest < ActiveSupport::TestCase
23 include Redmine::I18n
23 include Redmine::I18n
24
24
25 REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
25 REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
26 NUM_REV = 32
26 NUM_REV = 34
27 CHAR_1_HEX = "\xc3\x9c"
27 CHAR_1_HEX = "\xc3\x9c"
28
28
29 def setup
29 def setup
@@ -144,7 +144,7 class RepositoryMercurialTest < ActiveSupport::TestCase
144
144
145 # with_limit
145 # with_limit
146 changesets = @repository.latest_changesets('', nil, 2)
146 changesets = @repository.latest_changesets('', nil, 2)
147 assert_equal %w|31 30|, changesets.collect(&:revision)
147 assert_equal ["#{NUM_REV - 1}", "#{NUM_REV - 2}"], changesets.collect(&:revision)
148
148
149 # with_filepath
149 # with_filepath
150 changesets = @repository.latest_changesets(
150 changesets = @repository.latest_changesets(
@@ -365,7 +365,7 class RepositoryMercurialTest < ActiveSupport::TestCase
365 @repository.fetch_changesets
365 @repository.fetch_changesets
366 @project.reload
366 @project.reload
367 assert_equal NUM_REV, @repository.changesets.count
367 assert_equal NUM_REV, @repository.changesets.count
368 %w|31 31eeee7395c8 31eee|.each do |r1|
368 ["#{NUM_REV - 1}", "2e6d54642923", "2e6d5"].each do |r1|
369 changeset = @repository.find_changeset_by_name(r1)
369 changeset = @repository.find_changeset_by_name(r1)
370 assert_nil changeset.next
370 assert_nil changeset.next
371 end
371 end
General Comments 0
You need to be logged in to leave comments. Login now