Commit 36b99a4e authored by Toshi MARUYAMA's avatar Toshi MARUYAMA

scm: use scmid for "commit:xxx" link if available (#3724).

scmid is more solid than revision number.

Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4694 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent fb51f27b
......@@ -651,7 +651,7 @@ module ApplicationHelper
end
when 'commit'
if project && (changeset = project.changesets.find(:first, :conditions => ["scmid LIKE ?", "#{name}%"]))
link = link_to h("#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision},
link = link_to h("#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.identifier},
:class => 'changeset',
:title => truncate_single_line(changeset.comments, :length => 100)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment