Merged r12138, r12149, r12156 and r12157 from trunk to 2.3-stable (#14931)

scm: fix annotate error with non ASCII author on Ruby 1.9 and Ruby 2.0.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@12160 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA committed 2013-09-19 03:53:31 +00:00
1 parent 79f90dfba5
commit 0a25ee385f
3 files changed
+68 -2

No files matched your search

+12 -2
View File
@@ -19,8 +19,18 @@
<tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>">
<th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th>
<td class="revision">
<%= (revision.identifier ? link_to_revision(revision, @repository) : format_revision(revision)) if revision && revision != previous_revision %></td>
<td class="author"><%= h(revision.author.to_s.split('<').first) if revision && revision != previous_revision %></td>
<% if revision && revision != previous_revision %>
<%= revision.identifier ?
link_to_revision(revision, @repository) : format_revision(revision) %>
<% end %>
</td>
<td class="author">
<% if revision && revision != previous_revision %>
<% author = Redmine::CodesetUtil.to_utf8(revision.author.to_s,
@repository.repo_log_encoding) %>
<%= author.split('<').first %>
<% end %>
</td>
<td class="line-code"><pre><%= line.html_safe %></pre></td>
</tr>
<% line_num += 1; previous_revision = revision %>