]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: update test repository (#23055)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 22 Mar 2020 16:34:59 +0000 (16:34 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 22 Mar 2020 16:34:59 +0000 (16:34 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19607 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 751f44f99e6c8c8d350c2e744c87da6c94b7d92e..e1a2aa3b51e9e717f685531ec0bce90c25f9095c 100644 (file)
Binary files a/test/fixtures/repositories/mercurial_repository.hg and b/test/fixtures/repositories/mercurial_repository.hg differ
index e79ad04130b66713ee61cc6494bedadde6fcd337..ea1422c51d68abfb598e886165344423f8ad5870 100644 (file)
@@ -27,7 +27,7 @@ class RepositoriesMercurialControllerTest < Redmine::RepositoryControllerTest
 
   REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
   PRJ_ID     = 3
-  NUM_REV    = 34
+  NUM_REV    = 36
 
   def setup
     super
index 93621a8b2e3518284aacf8244ffa95df6ddeb4b7..3904fd0b372669a0908eebf128b42009bc26b94c 100644 (file)
@@ -84,8 +84,8 @@ class MercurialAdapterTest < ActiveSupport::TestCase
         adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo)
         repo_path =  adp.info.root_url.gsub(/\\/, "/")
         assert_equal REPOSITORY_PATH, repo_path
-        assert_equal '33', adp.info.lastrev.revision
-        assert_equal '2e6d546429230f377d7d19c2078abd2dd909f235',adp.info.lastrev.scmid
+        assert_equal '35', adp.info.lastrev.revision
+        assert_equal '3e998343166a1b8273973bcd46dd2bad74344d74',adp.info.lastrev.scmid
       end
     end
 
@@ -336,39 +336,44 @@ class MercurialAdapterTest < ActiveSupport::TestCase
       @adapter.branches.each do |b|
         branches << b
       end
-      assert_equal 7, branches.length
+      assert_equal 8, branches.length
 
-      branch_default = branches[0]
+      branch_ctrl = branches[0]
+      assert_equal 'issue-23055-ctrl-char', branch_ctrl.to_s
+      assert_equal '35', branch_ctrl.revision
+      assert_equal '3e998343166a1b8273973bcd46dd2bad74344d74', branch_ctrl.scmid
+
+      branch_default = branches[1]
       assert_equal 'default', branch_default.to_s
       assert_equal '31', branch_default.revision
       assert_equal '31eeee7395c8c78e66dd54c50addd078d10b2355', branch_default.scmid
 
-      branch_test01 = branches[1]
+      branch_test01 = branches[2]
       assert_equal 'test-branch-01', branch_test01.to_s
       assert_equal '30', branch_test01.revision
       assert_equal 'ad4dc4f80284a4f9168b77e0b6de288e5d207ee7', branch_test01.scmid
 
-      branch_char_1 = branches[2]
+      branch_char_1 = branches[3]
       assert_equal @branch_char_1, branch_char_1.to_s
       assert_equal '27', branch_char_1.revision
       assert_equal '7bbf4c738e7145149d2e5eb1eed1d3a8ddd3b914', branch_char_1.scmid
 
-      branch_bracket = branches[3]
+      branch_bracket = branches[4]
       assert_equal 'branch (1)[2]&,%.-3_4', branch_bracket.to_s
       assert_equal '25', branch_bracket.revision
       assert_equal 'afc61e85bde74de930e5846c8451bd55b5bafc9c', branch_bracket.scmid
 
-      branch_char_0 = branches[4]
+      branch_char_0 = branches[5]
       assert_equal @branch_char_0, branch_char_0.to_s
       assert_equal '23', branch_char_0.revision
       assert_equal 'c8d3e4887474af6a589190140508037ebaa9d9c3', branch_char_0.scmid
 
-      branch_latin1 = branches[5]
+      branch_latin1 = branches[6]
       assert_equal 'test_branch.latin-1', branch_latin1.to_s
       assert_equal '22', branch_latin1.revision
       assert_equal 'c2ffe7da686aa3d956e59f2a2854cf8980a8b768', branch_latin1.scmid
 
-      branch_test00 = branches[6]
+      branch_test00 = branches[7]
       assert_equal 'test-branch-00',branch_test00.to_s
       assert_equal '13', branch_test00.revision
       assert_equal '3a330eb329586ea2adb3f83237c23310e744ebe9', branch_test00.scmid
@@ -376,6 +381,7 @@ class MercurialAdapterTest < ActiveSupport::TestCase
 
     def test_branchmap
       bm = {
+         'issue-23055-ctrl-char' => '3e998343166a1b8273973bcd46dd2bad74344d74',
          'default'               => '31eeee7395c8c78e66dd54c50addd078d10b2355',
          'test_branch.latin-1'   => 'c2ffe7da686aa3d956e59f2a2854cf8980a8b768',
          'branch (1)[2]&,%.-3_4' => 'afc61e85bde74de930e5846c8451bd55b5bafc9c',
index b7a2f0fffc16d3ee439675ac2b7ef24fd29a7b56..54a58931e454cadc6fc207633e0cee8b22a0d5c6 100644 (file)
@@ -25,7 +25,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
   include Redmine::I18n
 
   REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
-  NUM_REV = 34
+  NUM_REV = 36
 
   def setup
     User.current = nil
@@ -167,7 +167,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
       @repository.fetch_changesets
       @project.reload
       assert_equal NUM_REV, @repository.changesets.count
-      assert_equal 46, @repository.filechanges.count
+      assert_equal 48, @repository.filechanges.count
       rev0 = @repository.changesets.find_by_revision('0')
       assert_equal "Initial import.\nThe repository contains 3 files.",
                    rev0.comments
@@ -590,7 +590,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
       @repository.fetch_changesets
       @project.reload
       assert_equal NUM_REV, @repository.changesets.count
-      [(NUM_REV - 1).to_s, "2e6d54642923", "2e6d5"].each do |r1|
+      [(NUM_REV - 1).to_s, "3e998343166a", "3e998"].each do |r1|
         changeset = @repository.find_changeset_by_name(r1)
         assert_nil changeset.next
       end