@@ -130,17 +130,14 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
130 | 130 | assert_equal NUM_REV, @repository.changesets.count |
|
131 | 131 | end |
|
132 | 132 | |
|
133 |
def test_fetch_changesets_ |
|
|
133 | def test_fetch_changesets_history_editing | |
|
134 | 134 | assert_equal 0, @repository.changesets.count |
|
135 | 135 | @repository.fetch_changesets |
|
136 | 136 | @project.reload |
|
137 | 137 | assert_equal NUM_REV, @repository.changesets.count |
|
138 |
|
|
|
139 | assert_equal 5, extra_info_db.size | |
|
140 | assert_equal "1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127", | |
|
141 | extra_info_db["latin-1-path-encoding"]["last_scmid"] | |
|
138 | assert_equal 5, @repository.extra_info["branches"].size | |
|
142 | 139 | assert_equal "83ca5fd546063a3c7dc2e568ba3355661a9e2b2c", |
|
143 |
extra_info |
|
|
140 | @repository.extra_info["branches"]["master"]["last_scmid"] | |
|
144 | 141 | |
|
145 | 142 | del_revs = [ |
|
146 | 143 | "83ca5fd546063a3c7dc2e568ba3355661a9e2b2c", |
@@ -154,21 +151,28 class RepositoryGitTest < ActiveSupport::TestCase | |||
|
154 | 151 | rev.destroy if del_revs.detect {|r| r == rev.scmid.to_s } |
|
155 | 152 | end |
|
156 | 153 | @project.reload |
|
157 |
|
|
|
158 | assert_equal 22, cs1.count | |
|
154 | assert_equal NUM_REV - 6, @repository.changesets.count | |
|
155 | ||
|
156 | c = Changeset.new(:repository => @repository, | |
|
157 | :committed_on => Time.now, | |
|
158 | :revision => "abcd1234efgh", | |
|
159 | :scmid => "abcd1234efgh", | |
|
160 | :comments => 'test') | |
|
161 | assert c.save | |
|
162 | @project.reload | |
|
163 | assert_equal NUM_REV - 5, @repository.changesets.count | |
|
164 | ||
|
159 | 165 | h = @repository.extra_info.dup |
|
160 | h["branches"]["master"]["last_scmid"] = | |
|
161 | "abcd1234efgh" | |
|
166 | h["branches"]["master"]["last_scmid"] = "abcd1234efgh" | |
|
162 | 167 | @repository.merge_extra_info(h) |
|
163 | 168 | @repository.save |
|
164 | 169 | @project.reload |
|
165 | extra_info_db_1 = @repository.extra_info["branches"] | |
|
166 | 170 | assert_equal "abcd1234efgh", |
|
167 |
extra_info |
|
|
171 | @repository.extra_info["branches"]["master"]["last_scmid"] | |
|
168 | 172 | |
|
169 | 173 | @repository.fetch_changesets |
|
170 | 174 | @project.reload |
|
171 |
assert_equal |
|
|
175 | assert_equal NUM_REV - 5, @repository.changesets.count | |
|
172 | 176 | end |
|
173 | 177 | |
|
174 | 178 | def test_parents |
General Comments 0
You need to be logged in to leave comments.
Login now