@@ -128,7 +128,7 class Repository::Cvs < Repository | |||
|
128 | 128 | fetch_since = latest_changeset ? latest_changeset.committed_on : nil |
|
129 | 129 | transaction do |
|
130 | 130 | tmp_rev_num = 1 |
|
131 |
scm.revisions('', fetch_since, nil, : |
|
|
131 | scm.revisions('', fetch_since, nil, :log_encoding => repo_log_encoding) do |revision| | |
|
132 | 132 | # only add the change to the database, if it doen't exists. the cvs log |
|
133 | 133 | # is not exclusive at all. |
|
134 | 134 | tmp_time = revision.time.clone |
@@ -239,9 +239,10 module Redmine | |||
|
239 | 239 | revision = $1 |
|
240 | 240 | elsif /^date:\s+(\d+.\d+.\d+\s+\d+:\d+:\d+)/ =~ line |
|
241 | 241 | date = Time.parse($1) |
|
242 | # TODO: This regexp fails in some non UTF-8 chars on Ruby 1.8. | |
|
243 |
author |
|
|
244 | file_state = /state: ([^;]+)/.match(line)[1] | |
|
242 | line_utf8 = scm_iconv('UTF-8', options[:log_encoding], line) | |
|
243 | author_utf8 = /author: ([^;]+)/.match(line_utf8)[1] | |
|
244 | author = scm_iconv(options[:log_encoding], 'UTF-8', author_utf8) | |
|
245 | file_state = /state: ([^;]+)/.match(line)[1] | |
|
245 | 246 | # TODO: |
|
246 | 247 | # linechanges only available in CVS.... |
|
247 | 248 | # maybe a feature our SVN implementation. |
@@ -24,7 +24,7 begin | |||
|
24 | 24 | |
|
25 | 25 | def test_revisions_all |
|
26 | 26 | cnt = 0 |
|
27 |
@adapter.revisions('', nil, nil, : |
|
|
27 | @adapter.revisions('', nil, nil, :log_encoding => 'UTF-8') do |revision| | |
|
28 | 28 | cnt += 1 |
|
29 | 29 | end |
|
30 | 30 | assert_equal 16, cnt |
@@ -33,7 +33,7 begin | |||
|
33 | 33 | def test_revisions_from_rev3 |
|
34 | 34 | rev3_committed_on = Time.gm(2007, 12, 13, 16, 27, 22) |
|
35 | 35 | cnt = 0 |
|
36 |
@adapter.revisions('', rev3_committed_on, nil, : |
|
|
36 | @adapter.revisions('', rev3_committed_on, nil, :log_encoding => 'UTF-8') do |revision| | |
|
37 | 37 | cnt += 1 |
|
38 | 38 | end |
|
39 | 39 | assert_equal 4, cnt |
General Comments 0
You need to be logged in to leave comments.
Login now