diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 6195c640..4b0a8346 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -177,9 +177,10 @@ class RepositoriesController < ApplicationController @changeset = @repository.find_changeset_by_name(@rev) @changeset_to = @rev_to ? @repository.find_changeset_by_name(@rev_to) : nil + @diff_format_revisions = @repository.diff_format_revisions(@changeset, @changeset_to) end end - + def stats end diff --git a/app/models/repository.rb b/app/models/repository.rb index dee705c9..3a84a691 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 diff --git a/app/views/repositories/diff.rhtml b/app/views/repositories/diff.rhtml index e2323549..efb84a44 100644 --- a/app/views/repositories/diff.rhtml +++ b/app/views/repositories/diff.rhtml @@ -1,4 +1,4 @@ -