##// END OF EJS Templates
scm: cvs: fix parsing revisions if author is not ASCII....
Toshi MARUYAMA -
r5335:bebf8247a7f8
parent child
Show More
@@ -252,8 +252,6 class Changeset < ActiveRecord::Base
252 Changeset.to_utf8(str.to_s.strip, encoding)
252 Changeset.to_utf8(str.to_s.strip, encoding)
253 end
253 end
254
254
255 private
256
257 def self.to_utf8(str, encoding)
255 def self.to_utf8(str, encoding)
258 return str if str.nil?
256 return str if str.nil?
259 str.force_encoding("ASCII-8BIT") if str.respond_to?(:force_encoding)
257 str.force_encoding("ASCII-8BIT") if str.respond_to?(:force_encoding)
@@ -137,11 +137,12 class Repository::Cvs < Repository
137 revision.paths[0][:revision]
137 revision.paths[0][:revision]
138 )
138 )
139 cmt = Changeset.normalize_comments(revision.message, repo_log_encoding)
139 cmt = Changeset.normalize_comments(revision.message, repo_log_encoding)
140 author_utf8 = Changeset.to_utf8(revision.author, repo_log_encoding)
140 cs = changesets.find(
141 cs = changesets.find(
141 :first,
142 :first,
142 :conditions => {
143 :conditions => {
143 :committed_on => tmp_time - time_delta .. tmp_time + time_delta,
144 :committed_on => tmp_time - time_delta .. tmp_time + time_delta,
144 :committer => revision.author,
145 :committer => author_utf8,
145 :comments => cmt
146 :comments => cmt
146 }
147 }
147 )
148 )
General Comments 0
You need to be logged in to leave comments. Login now