]> source.dussan.org Git - redmine.git/commitdiff
scm: use format_revision() for history, view and annotate (#3724).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 21 Jan 2011 13:22:08 +0000 (13:22 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 21 Jan 2011 13:22:08 +0000 (13:22 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4733 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/repositories_controller.rb
app/views/repositories/_breadcrumbs.rhtml

index b5f70e3f0684445667f68e246d77008c140407a3..50a6ff4a1b9c196afd3fb51bbb9845aebe223f45 100644 (file)
@@ -94,6 +94,7 @@ class RepositoriesController < ApplicationController
     (show_error_not_found; return) unless @entry
     @changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i)
     @properties = @repository.properties(@path, @rev)
+    @changeset = @repository.find_changeset_by_name(@rev)
   end
   
   def revisions
@@ -127,17 +128,19 @@ class RepositoriesController < ApplicationController
     else
       # Prevent empty lines when displaying a file with Windows style eol
       @content.gsub!("\r\n", "\n")
+      @changeset = @repository.find_changeset_by_name(@rev)
    end
   end
-  
+
   def annotate
     @entry = @repository.entry(@path, @rev)
     (show_error_not_found; return) unless @entry
     
     @annotate = @repository.scm.annotate(@path, @rev)
     (render_error l(:error_scm_annotate); return) if @annotate.nil? || @annotate.empty?
+    @changeset = @repository.find_changeset_by_name(@rev)
   end
-  
+
   def revision
     raise ChangesetNotFound if @rev.blank?
     @changeset = @repository.find_changeset_by_name(@rev)
index bab0ff3387524c107132059e349abe558adda2b7..1dd2445c745e9401f6985da9892d7006680f5d20 100644 (file)
@@ -16,6 +16,6 @@ dirs.each do |dir|
     / <%= link_to h(filename), :action => 'changes', :id => @project, :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
 <% end %>
 
-<%= "@ #{h revision}" if revision %>
+<%= "@ #{h format_revision(@changeset)}" if @changeset %>
 
 <% html_title(with_leading_slash(path)) -%>