summaryrefslogtreecommitdiffstats
path: root/app/models/repository.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-01-11 16:04:07 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-01-11 16:04:07 +0000
commitebb19c58637cfd9af4264d28e9aaa924a68f294e (patch)
treeb2ea45ea61c258573786baf749496b972c16acc8 /app/models/repository.rb
parentfdd0a2ca9b72687d6a22849c62c2868def1b8322 (diff)
downloadredmine-ebb19c58637cfd9af4264d28e9aaa924a68f294e.tar.gz
redmine-ebb19c58637cfd9af4264d28e9aaa924a68f294e.zip
scm: changing two revision diff text at SCM adapter level (#3724).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4698 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index dee705c97..3a84a691a 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -86,7 +86,14 @@ class Repository < ActiveRecord::Base
def diff(path, rev, rev_to)
scm.diff(path, rev, rev_to)
end
-
+
+ def diff_format_revisions(cs, cs_to, sep=':')
+ text = ""
+ text << cs_to.format_identifier + sep if cs_to
+ text << cs.format_identifier if cs
+ text
+ end
+
# Returns a path relative to the url of the repository
def relative_path(path)
path