|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -27,7 +27,7 class RepositoriesGitControllerTest < ActionController::TestCase | |||
|
27 | 27 | REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin? |
|
28 | 28 | PRJ_ID = 3 |
|
29 | 29 | CHAR_1_HEX = "\xc3\x9c" |
|
30 |
NUM_REV = 2 |
|
|
30 | NUM_REV = 28 | |
|
31 | 31 | |
|
32 | 32 | ## Git, Mercurial and CVS path encodings are binary. |
|
33 | 33 | ## Subversion supports URL encoding for path. |
@@ -65,7 +65,11 begin | |||
|
65 | 65 | @adapter.branches.each do |b| |
|
66 | 66 | brs << b |
|
67 | 67 | end |
|
68 |
assert_equal |
|
|
68 | assert_equal 5, brs.length | |
|
69 | br_issue_8857 = brs[-5] | |
|
70 | assert_equal 'issue-8857', br_issue_8857.to_s | |
|
71 | assert_equal '2a682156a3b6e77a8bf9cd4590e8db757f3c6c78', br_issue_8857.revision | |
|
72 | assert_equal br_issue_8857.scmid, br_issue_8857.revision | |
|
69 | 73 | br_latin_1_path = brs[-4] |
|
70 | 74 | assert_equal 'latin-1-path-encoding', br_latin_1_path.to_s |
|
71 | 75 | assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', br_latin_1_path.revision |
@@ -23,7 +23,7 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
23 | 23 | REPOSITORY_PATH = Rails.root.join('tmp/test/git_repository').to_s |
|
24 | 24 | REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin? |
|
25 | 25 | |
|
26 |
NUM_REV = 2 |
|
|
26 | NUM_REV = 28 | |
|
27 | 27 | |
|
28 | 28 | FELIX_HEX = "Felix Sch\xC3\xA4fer" |
|
29 | 29 | CHAR_1_HEX = "\xc3\x9c" |
@@ -71,7 +71,7 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
71 | 71 | @project.reload |
|
72 | 72 | |
|
73 | 73 | assert_equal NUM_REV, @repository.changesets.count |
|
74 |
assert_equal 3 |
|
|
74 | assert_equal 39, @repository.changes.count | |
|
75 | 75 | |
|
76 | 76 | commit = @repository.changesets.find(:first, :order => 'committed_on ASC') |
|
77 | 77 | assert_equal "Initial import.\nThe repository contains 3 files.", commit.comments |
@@ -87,7 +87,7 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
87 | 87 | assert_equal "README", change.path |
|
88 | 88 | assert_equal "A", change.action |
|
89 | 89 | |
|
90 |
assert_equal |
|
|
90 | assert_equal 5, @repository.extra_info["branches"].size | |
|
91 | 91 | end |
|
92 | 92 | |
|
93 | 93 | def test_fetch_changesets_incremental |
@@ -95,9 +95,7 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
95 | 95 | @repository.fetch_changesets |
|
96 | 96 | @project.reload |
|
97 | 97 | assert_equal NUM_REV, @repository.changesets.count |
|
98 | assert_equal 33, @repository.changes.count | |
|
99 | 98 | extra_info_db = @repository.extra_info["branches"] |
|
100 | assert_equal 4, extra_info_db.size | |
|
101 | 99 | assert_equal "1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127", |
|
102 | 100 | extra_info_db["latin-1-path-encoding"]["last_scmid"] |
|
103 | 101 | assert_equal "83ca5fd546063a3c7dc2e568ba3355661a9e2b2c", |
@@ -116,7 +114,7 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
116 | 114 | end |
|
117 | 115 | @project.reload |
|
118 | 116 | cs1 = @repository.changesets |
|
119 |
assert_equal |
|
|
117 | assert_equal 22, cs1.count | |
|
120 | 118 | h = @repository.extra_info.dup |
|
121 | 119 | h["branches"]["master"]["last_scmid"] = |
|
122 | 120 | "4a07fe31bffcf2888791f3e6cbc9c4545cefe3e8" |
@@ -138,7 +136,7 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
138 | 136 | @project.reload |
|
139 | 137 | assert_equal NUM_REV, @repository.changesets.count |
|
140 | 138 | extra_info_db = @repository.extra_info["branches"] |
|
141 |
assert_equal |
|
|
139 | assert_equal 5, extra_info_db.size | |
|
142 | 140 | assert_equal "1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127", |
|
143 | 141 | extra_info_db["latin-1-path-encoding"]["last_scmid"] |
|
144 | 142 | assert_equal "83ca5fd546063a3c7dc2e568ba3355661a9e2b2c", |
@@ -157,7 +155,7 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
157 | 155 | end |
|
158 | 156 | @project.reload |
|
159 | 157 | cs1 = @repository.changesets |
|
160 |
assert_equal |
|
|
158 | assert_equal 22, cs1.count | |
|
161 | 159 | h = @repository.extra_info.dup |
|
162 | 160 | h["branches"]["master"]["last_scmid"] = |
|
163 | 161 | "abcd1234efgh" |
@@ -170,7 +168,7 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
170 | 168 | |
|
171 | 169 | @repository.fetch_changesets |
|
172 | 170 | @project.reload |
|
173 |
assert_equal |
|
|
171 | assert_equal 22, @repository.changesets.count | |
|
174 | 172 | end |
|
175 | 173 | |
|
176 | 174 | def test_parents |
@@ -227,7 +225,7 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
227 | 225 | end |
|
228 | 226 | @project.reload |
|
229 | 227 | cs1 = @repository.changesets |
|
230 |
assert_equal |
|
|
228 | assert_equal NUM_REV - 6, cs1.count | |
|
231 | 229 | assert_equal 0, @repository.extra_info["db_consistent"]["ordering"] |
|
232 | 230 | h = @repository.extra_info.dup |
|
233 | 231 | h["branches"]["master"]["last_scmid"] = |
@@ -479,7 +477,7 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
479 | 477 | @repository.fetch_changesets |
|
480 | 478 | @project.reload |
|
481 | 479 | assert_equal NUM_REV, @repository.changesets.count |
|
482 | %w|7234cb2750b63f47bff735edc50a1c0a433c2518 7234cb2|.each do |r1| | |
|
480 | %w|95488a44bc25f7d1f97d775a31359539ff333a63 95488a44b|.each do |r1| | |
|
483 | 481 | changeset = @repository.find_changeset_by_name(r1) |
|
484 | 482 | assert_nil changeset.previous |
|
485 | 483 | end |
General Comments 0
You need to be logged in to leave comments.
Login now