From: Toshi MARUYAMA Date: Tue, 11 Jan 2011 16:02:36 +0000 (+0000) Subject: scm: use scmid for "commit:xxx" link if available (#3724). X-Git-Tag: 1.2.0~1092 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=36b99a4ed39bf80cf87e0693cba21506cdee45e4;p=redmine.git 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 --- diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3cdd3add5..f04e5491e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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