diff app/models/changeset.rb @ 1494:e248c7af89ec redmine-2.4

Update to Redmine SVN revision 12979 on 2.4-stable branch
author Chris Cannam
date Mon, 17 Mar 2014 08:54:02 +0000
parents 261b3d9a4903
children dffacf8a6908
line wrap: on
line diff
--- a/app/models/changeset.rb	Tue Jan 14 14:37:42 2014 +0000
+++ b/app/models/changeset.rb	Mon Mar 17 08:54:02 2014 +0000
@@ -1,5 +1,5 @@
 # Redmine - project management software
-# Copyright (C) 2006-2013  Jean-Philippe Lang
+# Copyright (C) 2006-2014  Jean-Philippe Lang
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -154,13 +154,14 @@
   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}"