|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -28,7 +28,7 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||
|
28 | 28 | REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s |
|
29 | 29 | CHAR_1_HEX = "\xc3\x9c" |
|
30 | 30 | PRJ_ID = 3 |
|
31 |
NUM_REV = 2 |
|
|
31 | NUM_REV = 32 | |
|
32 | 32 | |
|
33 | 33 | ruby19_non_utf8_pass = |
|
34 | 34 | (RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8') |
@@ -72,8 +72,8 begin | |||
|
72 | 72 | adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo) |
|
73 | 73 | repo_path = adp.info.root_url.gsub(/\\/, "/") |
|
74 | 74 | assert_equal REPOSITORY_PATH, repo_path |
|
75 |
assert_equal ' |
|
|
76 |
assert_equal '3 |
|
|
75 | assert_equal '31', adp.info.lastrev.revision | |
|
76 | assert_equal '31eeee7395c8',adp.info.lastrev.scmid | |
|
77 | 77 | end |
|
78 | 78 | end |
|
79 | 79 | |
@@ -257,6 +257,7 begin | |||
|
257 | 257 | def test_branches |
|
258 | 258 | assert_equal [ |
|
259 | 259 | 'default', |
|
260 | 'test-branch-01', | |
|
260 | 261 | @branch_char_1, |
|
261 | 262 | 'branch (1)[2]&,%.-3_4', |
|
262 | 263 | @branch_char_0, |
@@ -267,10 +268,11 begin | |||
|
267 | 268 | |
|
268 | 269 | def test_branchmap |
|
269 | 270 | bm = { |
|
270 |
'default' => '3 |
|
|
271 | 'default' => '31eeee7395c8', | |
|
271 | 272 | 'test_branch.latin-1' => 'c2ffe7da686a', |
|
272 | 273 | 'branch (1)[2]&,%.-3_4' => 'afc61e85bde7', |
|
273 | 274 | 'test-branch-00' => '3a330eb32958', |
|
275 | "test-branch-01" => 'ad4dc4f80284', | |
|
274 | 276 | @branch_char_0 => 'c8d3e4887474', |
|
275 | 277 | @branch_char_1 => '7bbf4c738e71', |
|
276 | 278 | } |
@@ -21,7 +21,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
21 | 21 | fixtures :projects |
|
22 | 22 | |
|
23 | 23 | REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s |
|
24 |
NUM_REV = 2 |
|
|
24 | NUM_REV = 32 | |
|
25 | 25 | CHAR_1_HEX = "\xc3\x9c" |
|
26 | 26 | |
|
27 | 27 | if File.directory?(REPOSITORY_PATH) |
@@ -56,7 +56,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
56 | 56 | @repository.fetch_changesets |
|
57 | 57 | @project.reload |
|
58 | 58 | assert_equal NUM_REV, @repository.changesets.count |
|
59 |
assert_equal |
|
|
59 | assert_equal 46, @repository.changes.count | |
|
60 | 60 | assert_equal "Initial import.\nThe repository contains 3 files.", |
|
61 | 61 | @repository.changesets.find_by_revision('0').comments |
|
62 | 62 | end |
@@ -109,19 +109,19 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
109 | 109 | |
|
110 | 110 | # with_limit |
|
111 | 111 | changesets = @repository.latest_changesets('', nil, 2) |
|
112 |
assert_equal %w| |
|
|
112 | assert_equal %w|31 30|, changesets.collect(&:revision) | |
|
113 | 113 | |
|
114 | 114 | # with_filepath |
|
115 | 115 | changesets = @repository.latest_changesets( |
|
116 | 116 | '/sql_escape/percent%dir/percent%file1.txt', nil) |
|
117 | assert_equal %w|11 10 9|, changesets.collect(&:revision) | |
|
117 | assert_equal %w|30 11 10 9|, changesets.collect(&:revision) | |
|
118 | 118 | |
|
119 | 119 | changesets = @repository.latest_changesets( |
|
120 | 120 | '/sql_escape/underscore_dir/understrike_file.txt', nil) |
|
121 | assert_equal %w|12 9|, changesets.collect(&:revision) | |
|
121 | assert_equal %w|30 12 9|, changesets.collect(&:revision) | |
|
122 | 122 | |
|
123 | 123 | changesets = @repository.latest_changesets('README', nil) |
|
124 | assert_equal %w|28 17 8 6 1 0|, changesets.collect(&:revision) | |
|
124 | assert_equal %w|31 30 28 17 8 6 1 0|, changesets.collect(&:revision) | |
|
125 | 125 | |
|
126 | 126 | changesets = @repository.latest_changesets('README','8') |
|
127 | 127 | assert_equal %w|8 6 1 0|, changesets.collect(&:revision) |
@@ -135,7 +135,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
135 | 135 | |
|
136 | 136 | path = 'sql_escape/percent%dir' |
|
137 | 137 | changesets = @repository.latest_changesets(path, nil) |
|
138 | assert_equal %w|13 11 10 9|, changesets.collect(&:revision) | |
|
138 | assert_equal %w|30 13 11 10 9|, changesets.collect(&:revision) | |
|
139 | 139 | |
|
140 | 140 | changesets = @repository.latest_changesets(path, '11') |
|
141 | 141 | assert_equal %w|11 10 9|, changesets.collect(&:revision) |
@@ -145,7 +145,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
145 | 145 | |
|
146 | 146 | path = 'sql_escape/underscore_dir' |
|
147 | 147 | changesets = @repository.latest_changesets(path, nil) |
|
148 | assert_equal %w|13 12 9|, changesets.collect(&:revision) | |
|
148 | assert_equal %w|30 13 12 9|, changesets.collect(&:revision) | |
|
149 | 149 | |
|
150 | 150 | changesets = @repository.latest_changesets(path, '12') |
|
151 | 151 | assert_equal %w|12 9|, changesets.collect(&:revision) |
@@ -312,7 +312,7 class RepositoryMercurialTest < ActiveSupport::TestCase | |||
|
312 | 312 | @repository.fetch_changesets |
|
313 | 313 | @project.reload |
|
314 | 314 | assert_equal NUM_REV, @repository.changesets.count |
|
315 |
%w| |
|
|
315 | %w|31 31eeee7395c8 31eee|.each do |r1| | |
|
316 | 316 | changeset = @repository.find_changeset_by_name(r1) |
|
317 | 317 | assert_nil changeset.next |
|
318 | 318 | end |
General Comments 0
You need to be logged in to leave comments.
Login now