]> source.dussan.org Git - redmine.git/commitdiff
Merged r12929 from trunk to 2.5-stable (#16177)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 26 Feb 2014 13:01:43 +0000 (13:01 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 26 Feb 2014 13:01:43 +0000 (13:01 +0000)
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

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 40db389cb65b0f5817a4ad01b7647d1d837b9d0d..7f062d1f1e4a6a6273294f31c57cbf68bb3c1201 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 '31eeee7395c8c78e66dd54c50addd078d10b2355',adp.info.lastrev.scmid
+          assert_equal '33', adp.info.lastrev.revision
+          assert_equal '2e6d546429230f377d7d19c2078abd2dd909f235',adp.info.lastrev.scmid
         end
       end
 
index 953986edb6077adaf179dce25c781985da17e21d..9762e47a94bdd25463a923ea427ba8cec8abfee1 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
@@ -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