]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: update test repository for path contains space (#2664, #4455).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 4 Mar 2011 08:07:53 +0000 (08:07 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 4 Mar 2011 08:07:53 +0000 (08:07 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4997 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index 2b4eb62410643ae3c466665bab4f63dd0e7978e6..ef65dfeee43a710729d86db1b6a655f1a6264e57 100644 (file)
Binary files a/test/fixtures/repositories/mercurial_repository.hg and b/test/fixtures/repositories/mercurial_repository.hg differ
index b5629841b9b1c20bd40a41a6dff3788bcaf254cc..8e971ec96108290349d4cf0d9eaeac6b9b057840 100644 (file)
@@ -58,8 +58,8 @@ begin
           adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo)
           repo_path =  adp.info.root_url.gsub(/\\/, "/")
           assert_equal REPOSITORY_PATH, repo_path
-          assert_equal '24', adp.info.lastrev.revision
-          assert_equal '4cddb4e45f52',adp.info.lastrev.scmid
+          assert_equal '26', adp.info.lastrev.revision
+          assert_equal '3ae45e2d177d',adp.info.lastrev.scmid
         end
       end
 
@@ -241,18 +241,22 @@ begin
       end
 
       def test_branches
-        assert_equal ['default', @branch_char_1,
-                      'test_branch.latin-1', 'branch (1)[2]&,%.-3_4', 'test-branch-00'],
-                  @adapter.branches
+        assert_equal [
+            'default',
+            'branch (1)[2]&,%.-3_4',
+            @branch_char_1,
+            'test_branch.latin-1',
+            'test-branch-00',
+          ], @adapter.branches
       end
 
       def test_branchmap
         bm = {
-           'default'               => '4cddb4e45f52',
-           @branch_char_1          => 'c8d3e4887474',
+           'default'               => '3ae45e2d177d',
            'test_branch.latin-1'   => 'c2ffe7da686a',
-           'branch (1)[2]&,%.-3_4' => '933ca60293d7',
-           'test-branch-00'        => '3a330eb32958'
+           'branch (1)[2]&,%.-3_4' => 'afc61e85bde7',
+           'test-branch-00'        => '3a330eb32958',
+           @branch_char_1          => 'c8d3e4887474',
          }
         assert_equal bm, @adapter.branchmap
       end
index 9c3032bf33c9d774a4c090f2b4ccb19f2566cc92..d4053e1f4c6083df1dbd293c6cb4529d4fb9ff2d 100644 (file)
@@ -37,8 +37,8 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
     def test_fetch_changesets_from_scratch
       @repository.fetch_changesets
       @repository.reload
-      assert_equal 25, @repository.changesets.count
-      assert_equal 32, @repository.changes.count
+      assert_equal 27, @repository.changesets.count
+      assert_equal 34, @repository.changes.count
       assert_equal "Initial import.\nThe repository contains 3 files.",
                    @repository.changesets.find_by_revision('0').comments
     end
@@ -51,7 +51,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
       assert_equal 3, @repository.changesets.count
       
       @repository.fetch_changesets
-      assert_equal 25, @repository.changesets.count
+      assert_equal 27, @repository.changesets.count
     end
 
     def test_isodatesec
@@ -174,7 +174,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
       @repository.fetch_changesets
       @repository.reload
       changesets = @repository.latest_changesets('README', nil)
-      assert_equal %w|17 8 6 1 0|, changesets.collect(&:revision)
+      assert_equal %w|26 17 8 6 1 0|, changesets.collect(&:revision)
 
       path = 'sql_escape/percent%dir/percent%file1.txt'
       changesets = @repository.latest_changesets(path, nil)