diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-01-12 09:19:47 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-01-12 09:19:47 +0000 |
commit | 5df064ed85711ceecdcfbdd66402672cca2b0d58 (patch) | |
tree | 0db99d41c6bf2dc15a04aa1c095dda2248d03ec9 /app/models/changeset.rb | |
parent | b25c7003da4b0baef84e0b6a68e411bfec7d6177 (diff) | |
download | redmine-5df064ed85711ceecdcfbdd66402672cca2b0d58.tar.gz redmine-5df064ed85711ceecdcfbdd66402672cca2b0d58.zip |
Fixed Changeset#text_tag for changeset with hash and repository identifier (#13544).
git-svn-id: http://svn.redmine.org/redmine/trunk@12660 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/changeset.rb')
-rw-r--r-- | app/models/changeset.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 365981124..1040282da 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -154,13 +154,14 @@ class Changeset < ActiveRecord::Base end def text_tag(ref_project=nil) + repo = "" + if repository && repository.identifier.present? + repo = "#{repository.identifier}|" + end tag = if scmid? - "commit:#{scmid}" + "commit:#{repo}#{scmid}" else - "r#{revision}" - end - if repository && repository.identifier.present? - tag = "#{repository.identifier}|#{tag}" + "#{repo}r#{revision}" end if ref_project && project && ref_project != project tag = "#{project.identifier}:#{tag}" |