@@ -177,9 +177,10 class RepositoriesController < ApplicationController | |||||
177 |
|
177 | |||
178 | @changeset = @repository.find_changeset_by_name(@rev) |
|
178 | @changeset = @repository.find_changeset_by_name(@rev) | |
179 | @changeset_to = @rev_to ? @repository.find_changeset_by_name(@rev_to) : nil |
|
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 | end |
|
181 | end | |
181 | end |
|
182 | end | |
182 |
|
183 | |||
183 | def stats |
|
184 | def stats | |
184 | end |
|
185 | end | |
185 |
|
186 |
@@ -86,7 +86,14 class Repository < ActiveRecord::Base | |||||
86 | def diff(path, rev, rev_to) |
|
86 | def diff(path, rev, rev_to) | |
87 | scm.diff(path, rev, rev_to) |
|
87 | scm.diff(path, rev, rev_to) | |
88 | end |
|
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 | # Returns a path relative to the url of the repository |
|
97 | # Returns a path relative to the url of the repository | |
91 | def relative_path(path) |
|
98 | def relative_path(path) | |
92 | path |
|
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 | <!-- Choose view type --> |
|
3 | <!-- Choose view type --> | |
4 | <% form_tag({:path => to_path_param(@path)}, :method => 'get') do %> |
|
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