]> source.dussan.org Git - redmine.git/commitdiff
Merged r12929 from trunk to 2.4-stable (#16177)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 26 Feb 2014 13:05:45 +0000 (13:05 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 26 Feb 2014 13:05:45 +0000 (13:05 +0000)
scm: mercurial: add one "closed" branch to test repository.

git-svn-id: http://svn.redmine.org/redmine/branches/2.4-stable@12933 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/fixtures/repositories/mercurial_repository.hg
test/functional/repositories_mercurial_controller_test.rb
test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb
test/unit/repository_mercurial_test.rb

index 0b621e724a4844cea74393a2cd71e54254072897..751f44f99e6c8c8d350c2e744c87da6c94b7d92e 100644 (file)
Binary files a/test/fixtures/repositories/mercurial_repository.hg and b/test/fixtures/repositories/mercurial_repository.hg differ
index 6b1231f07ada67ce05d44fb86bc1785df7d87ee8..8eec4f3dea5c3668ba8274d0a83e801afdae6703 100644 (file)
@@ -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')
index 67c7745b8f6ff48496e1131d44fd78aac966885f..e10da106171f37d9bdca296083a1df45d6d82e54 100644 (file)
@@ -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 '31eeee7395c8',adp.info.lastrev.scmid
+          assert_equal '33', adp.info.lastrev.revision
+          assert_equal '2e6d54642923',adp.info.lastrev.scmid
         end
       end
 
index e10c05b48d3d5aec9697097fbbb2546d589f150a..6936dc505ea253a98cecb837f054ce5187496a46 100644 (file)
@@ -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
@@ -144,7 +144,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(
@@ -365,7 +365,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