|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -126,7 +126,7 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||
|
126 | 126 | "test-#{@char_1}.txt"], assigns(:entries).collect(&:name) |
|
127 | 127 | changesets = assigns(:changesets) |
|
128 | 128 | assert_not_nil changesets |
|
129 | assert_equal %w(21 20 19 18 17), changesets.collect(&:revision) | |
|
129 | assert_equal %w(27 21 20 19 18 17), changesets.collect(&:revision) | |
|
130 | 130 | end |
|
131 | 131 | end |
|
132 | 132 |
@@ -18,9 +18,11 begin | |||
|
18 | 18 | @diff_c_support = true |
|
19 | 19 | |
|
20 | 20 | @tag_char_1 = "tag-#{CHAR_1_HEX}-00" |
|
21 |
@branch_char_ |
|
|
21 | @branch_char_0 = "branch-#{CHAR_1_HEX}-00" | |
|
22 | @branch_char_1 = "branch-#{CHAR_1_HEX}-01" | |
|
22 | 23 | if @tag_char_1.respond_to?(:force_encoding) |
|
23 | 24 | @tag_char_1.force_encoding('UTF-8') |
|
25 | @branch_char_0.force_encoding('UTF-8') | |
|
24 | 26 | @branch_char_1.force_encoding('UTF-8') |
|
25 | 27 | end |
|
26 | 28 | end |
@@ -58,7 +60,7 begin | |||
|
58 | 60 | adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo) |
|
59 | 61 | repo_path = adp.info.root_url.gsub(/\\/, "/") |
|
60 | 62 | assert_equal REPOSITORY_PATH, repo_path |
|
61 |
assert_equal '2 |
|
|
63 | assert_equal '28', adp.info.lastrev.revision | |
|
62 | 64 | assert_equal '3ae45e2d177d',adp.info.lastrev.scmid |
|
63 | 65 | end |
|
64 | 66 | end |
@@ -243,8 +245,9 begin | |||
|
243 | 245 | def test_branches |
|
244 | 246 | assert_equal [ |
|
245 | 247 | 'default', |
|
246 | 'branch (1)[2]&,%.-3_4', | |
|
247 | 248 | @branch_char_1, |
|
249 | 'branch (1)[2]&,%.-3_4', | |
|
250 | @branch_char_0, | |
|
248 | 251 | 'test_branch.latin-1', |
|
249 | 252 | 'test-branch-00', |
|
250 | 253 | ], @adapter.branches |
@@ -256,7 +259,8 begin | |||
|
256 | 259 | 'test_branch.latin-1' => 'c2ffe7da686a', |
|
257 | 260 | 'branch (1)[2]&,%.-3_4' => 'afc61e85bde7', |
|
258 | 261 | 'test-branch-00' => '3a330eb32958', |
|
259 |
@branch_char_ |
|
|
262 | @branch_char_0 => 'c8d3e4887474', | |
|
263 | @branch_char_1 => '7bbf4c738e71', | |
|
260 | 264 | } |
|
261 | 265 | assert_equal bm, @adapter.branchmap |
|
262 | 266 | end |
@@ -43,8 +43,8 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
43 | 43 | def test_fetch_changesets_from_scratch |
|
44 | 44 | @repository.fetch_changesets |
|
45 | 45 | @repository.reload |
|
46 |
assert_equal 2 |
|
|
47 |
assert_equal 3 |
|
|
46 | assert_equal 29, @repository.changesets.count | |
|
47 | assert_equal 37, @repository.changes.count | |
|
48 | 48 | assert_equal "Initial import.\nThe repository contains 3 files.", |
|
49 | 49 | @repository.changesets.find_by_revision('0').comments |
|
50 | 50 | end |
@@ -57,7 +57,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
57 | 57 | assert_equal 3, @repository.changesets.count |
|
58 | 58 | |
|
59 | 59 | @repository.fetch_changesets |
|
60 |
assert_equal 2 |
|
|
60 | assert_equal 29, @repository.changesets.count | |
|
61 | 61 | end |
|
62 | 62 | |
|
63 | 63 | def test_isodatesec |
@@ -187,7 +187,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
187 | 187 | @repository.fetch_changesets |
|
188 | 188 | @repository.reload |
|
189 | 189 | changesets = @repository.latest_changesets('README', nil) |
|
190 |
assert_equal %w|2 |
|
|
190 | assert_equal %w|28 17 8 6 1 0|, changesets.collect(&:revision) | |
|
191 | 191 | |
|
192 | 192 | path = 'sql_escape/percent%dir/percent%file1.txt' |
|
193 | 193 | changesets = @repository.latest_changesets(path, nil) |
@@ -216,9 +216,9 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
216 | 216 | def test_previous |
|
217 | 217 | @repository.fetch_changesets |
|
218 | 218 | @repository.reload |
|
219 |
%w|2 |
|
|
219 | %w|28 3ae45e2d177d 3ae45|.each do |r1| | |
|
220 | 220 | changeset = @repository.find_changeset_by_name(r1) |
|
221 |
%w|2 |
|
|
221 | %w|27 7bbf4c738e71 7bbf|.each do |r2| | |
|
222 | 222 | assert_equal @repository.find_changeset_by_name(r2), changeset.previous |
|
223 | 223 | end |
|
224 | 224 | end |
@@ -236,9 +236,9 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
236 | 236 | def test_next |
|
237 | 237 | @repository.fetch_changesets |
|
238 | 238 | @repository.reload |
|
239 |
%w|2 |
|
|
239 | %w|27 7bbf4c738e71 7bbf|.each do |r2| | |
|
240 | 240 | changeset = @repository.find_changeset_by_name(r2) |
|
241 |
%w|2 |
|
|
241 | %w|28 3ae45e2d177d 3ae45|.each do |r1| | |
|
242 | 242 | assert_equal @repository.find_changeset_by_name(r1), changeset.next |
|
243 | 243 | end |
|
244 | 244 | end |
@@ -247,7 +247,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
247 | 247 | def test_next_nil |
|
248 | 248 | @repository.fetch_changesets |
|
249 | 249 | @repository.reload |
|
250 |
%w|2 |
|
|
250 | %w|28 3ae45e2d177d 3ae45|.each do |r1| | |
|
251 | 251 | changeset = @repository.find_changeset_by_name(r1) |
|
252 | 252 | assert_nil changeset.next |
|
253 | 253 | end |
General Comments 0
You need to be logged in to leave comments.
Login now