Feature #27831 » 27831-master.patch
app/controllers/repositories_controller.rb | ||
---|---|---|
32 | 32 |
before_action :find_project_repository, :except => [:new, :create, :edit, :update, :destroy, :committers] |
33 | 33 |
before_action :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue] |
34 | 34 |
before_action :authorize |
35 |
accept_rss_auth :revisions |
|
35 |
accept_rss_auth :revisions, :changes
|
|
36 | 36 | |
37 | 37 |
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed |
38 | 38 | |
39 |
include RepositoriesHelper |
|
40 | ||
39 | 41 |
def new |
40 | 42 |
@repository.is_default = @project.repository.nil? |
41 | 43 |
end |
... | ... | |
102 | 104 |
@entry = @repository.entry(@path, @rev) |
103 | 105 |
(show_error_not_found; return) unless @entry |
104 | 106 |
@changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i) |
105 |
@properties = @repository.properties(@path, @rev) |
|
106 | 107 |
@changeset = @repository.find_changeset_by_name(@rev) |
108 | ||
109 |
respond_to do |format| |
|
110 |
format.html do |
|
111 |
@properties = @repository.properties(@path, @rev) |
|
112 |
end |
|
113 |
format.atom do |
|
114 |
repo_text = @repository.identifier.presence || 'root' |
|
115 |
rev_text = @changeset.nil? ? @rev : format_revision(@changeset) |
|
116 |
render_feed(@changesets, :title => "#{@project.name}: #{repo_text} @ #{rev_text} - #{l(:label_change_plural)}") |
|
117 |
end |
|
118 |
end |
|
107 | 119 |
end |
108 | 120 | |
109 | 121 |
def revisions |
app/views/repositories/changes.html.erb | ||
---|---|---|
15 | 15 | |
16 | 16 |
<% content_for :header_tags do %> |
17 | 17 |
<%= stylesheet_link_tag "scm" %> |
18 |
<%= auto_discovery_link_tag( |
|
19 |
:atom, |
|
20 |
:params => request.query_parameters.merge(:key => User.current.rss_key), |
|
21 |
:format => 'atom') %> |
|
22 |
<% end %> |
|
23 | ||
24 |
<% other_formats_links do |f| %> |
|
25 |
<%= f.link_to_with_query_parameters 'Atom', :key => User.current.rss_key %> |
|
18 | 26 |
<% end %> |
19 | 27 | |
20 | 28 |
<% html_title(l(:label_change_plural)) -%> |
config/routes.rb | ||
---|---|---|
245 | 245 |
post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue' |
246 | 246 |
delete 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' |
247 | 247 |
get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions' |
248 |
get 'projects/:id/repository/:repository_id/changes', :to => 'repositories#changes' |
|
248 | 249 |
%w(browse show entry raw annotate diff).each do |action| |
249 | 250 |
get "projects/:id/repository/:repository_id/revisions/:rev/#{action}(/*path)", |
250 | 251 |
:controller => 'repositories', |
... | ... | |
257 | 258 |
get 'projects/:id/repository/graph', :to => 'repositories#graph' |
258 | 259 | |
259 | 260 |
get 'projects/:id/repository/revisions', :to => 'repositories#revisions' |
261 |
get 'projects/:id/repository/changes', :to => 'repositories#changes' |
|
260 | 262 |
get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision' |
261 | 263 |
get 'projects/:id/repository/revision', :to => 'repositories#revision' |
262 | 264 |
post 'projects/:id/repository/revisions/:rev/issues', :to => 'repositories#add_related_issue' |