@@ -177,9 +177,10 class RepositoriesController < ApplicationController | |||
|
177 | 177 | |
|
178 | 178 | @changeset = @repository.find_changeset_by_name(@rev) |
|
179 | 179 | @changeset_to = @rev_to ? @repository.find_changeset_by_name(@rev_to) : nil |
|
180 | @diff_format_revisions = @repository.diff_format_revisions(@changeset, @changeset_to) | |
|
180 | 181 | end |
|
181 | 182 | end |
|
182 | ||
|
183 | ||
|
183 | 184 | def stats |
|
184 | 185 | end |
|
185 | 186 |
@@ -86,7 +86,14 class Repository < ActiveRecord::Base | |||
|
86 | 86 | def diff(path, rev, rev_to) |
|
87 | 87 | scm.diff(path, rev, rev_to) |
|
88 | 88 | end |
|
89 | ||
|
89 | ||
|
90 | def diff_format_revisions(cs, cs_to, sep=':') | |
|
91 | text = "" | |
|
92 | text << cs_to.format_identifier + sep if cs_to | |
|
93 | text << cs.format_identifier if cs | |
|
94 | text | |
|
95 | end | |
|
96 | ||
|
90 | 97 | # Returns a path relative to the url of the repository |
|
91 | 98 | def relative_path(path) |
|
92 | 99 | path |
@@ -1,4 +1,4 | |||
|
1 |
<h2><%= l(:label_revision) %> <%= |
|
|
1 | <h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%=h @path %></h2> | |
|
2 | 2 | |
|
3 | 3 | <!-- Choose view type --> |
|
4 | 4 | <% form_tag({:path => to_path_param(@path)}, :method => 'get') do %> |
General Comments 0
You need to be logged in to leave comments.
Login now