]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: update test repository (#5501)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 28 Oct 2011 01:44:12 +0000 (01:44 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 28 Oct 2011 01:44:12 +0000 (01:44 +0000)
This test repository has one merged revision.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7662 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 54a8c2ef7bb70808e8de52cb80ee7ec5885e4d95..0b621e724a4844cea74393a2cd71e54254072897 100644 (file)
Binary files a/test/fixtures/repositories/mercurial_repository.hg and b/test/fixtures/repositories/mercurial_repository.hg differ
index 418d7f5260765154ec5c9e29592ad09670c0f03f..71a29af6e420bc925582e49b4fa5621152e041aa 100644 (file)
@@ -28,7 +28,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    = 29
+  NUM_REV    = 32
 
   ruby19_non_utf8_pass =
      (RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8')
index 10a78c4afbba7ec0552d934024994fe6031c3db9..cbd67c8fd95ed1eddefab34cbe4db0f5e8b7383f 100644 (file)
@@ -72,8 +72,8 @@ begin
           adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo)
           repo_path =  adp.info.root_url.gsub(/\\/, "/")
           assert_equal REPOSITORY_PATH, repo_path
-          assert_equal '28', adp.info.lastrev.revision
-          assert_equal '3ae45e2d177d',adp.info.lastrev.scmid
+          assert_equal '31', adp.info.lastrev.revision
+          assert_equal '31eeee7395c8',adp.info.lastrev.scmid
         end
       end
 
@@ -257,6 +257,7 @@ begin
       def test_branches
         assert_equal [
             'default',
+            'test-branch-01',
             @branch_char_1,
             'branch (1)[2]&,%.-3_4',
             @branch_char_0,
@@ -267,10 +268,11 @@ begin
 
       def test_branchmap
         bm = {
-           'default'               => '3ae45e2d177d',
+           'default'               => '31eeee7395c8',
            'test_branch.latin-1'   => 'c2ffe7da686a',
            'branch (1)[2]&,%.-3_4' => 'afc61e85bde7',
            'test-branch-00'        => '3a330eb32958',
+           "test-branch-01"        => 'ad4dc4f80284',
            @branch_char_0          => 'c8d3e4887474',
            @branch_char_1          => '7bbf4c738e71',
          }
index 402565ee9daec8ad6a095715ada6361b44396a84..f33640d117767d1fb2ace202f9d199aa6b4b1435 100644 (file)
@@ -21,7 +21,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
   fixtures :projects
 
   REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
-  NUM_REV = 29
+  NUM_REV = 32
   CHAR_1_HEX = "\xc3\x9c"
 
   if File.directory?(REPOSITORY_PATH)
@@ -56,7 +56,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
       @repository.fetch_changesets
       @project.reload
       assert_equal NUM_REV, @repository.changesets.count
-      assert_equal 37, @repository.changes.count
+      assert_equal 46, @repository.changes.count
       assert_equal "Initial import.\nThe repository contains 3 files.",
                    @repository.changesets.find_by_revision('0').comments
     end
@@ -109,19 +109,19 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
 
       # with_limit
       changesets = @repository.latest_changesets('', nil, 2)
-      assert_equal %w|28 27|, changesets.collect(&:revision)
+      assert_equal %w|31 30|, changesets.collect(&:revision)
 
       # with_filepath
       changesets = @repository.latest_changesets(
                       '/sql_escape/percent%dir/percent%file1.txt', nil)
-      assert_equal %w|11 10 9|, changesets.collect(&:revision)
+      assert_equal %w|30 11 10 9|, changesets.collect(&:revision)
 
       changesets = @repository.latest_changesets(
                       '/sql_escape/underscore_dir/understrike_file.txt', nil)
-      assert_equal %w|12 9|, changesets.collect(&:revision)
+      assert_equal %w|30 12 9|, changesets.collect(&:revision)
 
       changesets = @repository.latest_changesets('README', nil)
-      assert_equal %w|28 17 8 6 1 0|, changesets.collect(&:revision)
+      assert_equal %w|31 30 28 17 8 6 1 0|, changesets.collect(&:revision)
 
       changesets = @repository.latest_changesets('README','8')
       assert_equal %w|8 6 1 0|, changesets.collect(&:revision)
@@ -135,7 +135,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
 
       path = 'sql_escape/percent%dir'
       changesets = @repository.latest_changesets(path, nil)
-      assert_equal %w|13 11 10 9|, changesets.collect(&:revision)
+      assert_equal %w|30 13 11 10 9|, changesets.collect(&:revision)
 
       changesets = @repository.latest_changesets(path, '11')
       assert_equal %w|11 10 9|, changesets.collect(&:revision)
@@ -145,7 +145,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
 
       path = 'sql_escape/underscore_dir'
       changesets = @repository.latest_changesets(path, nil)
-      assert_equal %w|13 12 9|, changesets.collect(&:revision)
+      assert_equal %w|30 13 12 9|, changesets.collect(&:revision)
 
       changesets = @repository.latest_changesets(path, '12')
       assert_equal %w|12 9|, changesets.collect(&:revision)
@@ -312,7 +312,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
       @repository.fetch_changesets
       @project.reload
       assert_equal NUM_REV, @repository.changesets.count
-      %w|28 3ae45e2d177d 3ae45|.each do |r1|
+      %w|31 31eeee7395c8 31eee|.each do |r1|
         changeset = @repository.find_changeset_by_name(r1)
         assert_nil changeset.next
       end