scm: cvs: fix parsing revisions if author is not ASCII.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5455 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7e5bc046d6
commit
bebf8247a7
|
@ -252,8 +252,6 @@ class Changeset < ActiveRecord::Base
|
|||
Changeset.to_utf8(str.to_s.strip, encoding)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def self.to_utf8(str, encoding)
|
||||
return str if str.nil?
|
||||
str.force_encoding("ASCII-8BIT") if str.respond_to?(:force_encoding)
|
||||
|
|
|
@ -137,11 +137,12 @@ class Repository::Cvs < Repository
|
|||
revision.paths[0][:revision]
|
||||
)
|
||||
cmt = Changeset.normalize_comments(revision.message, repo_log_encoding)
|
||||
author_utf8 = Changeset.to_utf8(revision.author, repo_log_encoding)
|
||||
cs = changesets.find(
|
||||
:first,
|
||||
:conditions => {
|
||||
:committed_on => tmp_time - time_delta .. tmp_time + time_delta,
|
||||
:committer => revision.author,
|
||||
:committer => author_utf8,
|
||||
:comments => cmt
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue