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