Feature #27831
openATOM Feed for repository changes
0%
Description
Repositories currently offer 2 views over revisions, the "all revisions" view (RepositoriesController#revisions
), which will show all commits/revisions to that repository, and the "revisions/changes" view (RepositoriesController#changes
), which will show all commits/revisions preceding a named revision or a branch.
There currently is an ATOM feed for the "all revisions" view, unfortunately there is no feed for the "revisions/changes" view. Having a feed of the revisions of only a particular branch is useful for external integrations.
Files
Updated by Felix Schäfer almost 7 years ago
- File 27831.patch 27831.patch added
The attached patch adds an ATOM feed for the "revisions/changes" view.
Updated by Go MAEDA almost 7 years ago
- File 27831-error-log.txt 27831-error-log.txt added
- Status changed from New to Needs feedback
With the patch applied to the latest trunk r17140, I encountered the following error when I opened RepositoriesController#changes page. Could you take a look at it?
ActionView::Template::Error (unable to convert unpermitted parameters to hash): 22: <% end %> 23: 24: <% other_formats_links do |f| %> 25: <%= f.link_to 'Atom', :url => params.merge({:key => User.current.rss_key}) %> 26: <% end %> 27: 28: <% html_title(l(:label_change_plural)) -%> lib/redmine/views/other_formats_builder.rb:26:in `merge' lib/redmine/views/other_formats_builder.rb:26:in `link_to' app/views/repositories/changes.html.erb:25:in `block in _app_views_repositories_changes_html_erb___3745583827616173410_70126154703040' app/helpers/application_helper.rb:526:in `other_formats_links' app/views/repositories/changes.html.erb:24:in `_app_views_repositories_changes_html_erb___3745583827616173410_70126154703040' lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Error log: 27831-error-log.txt
Updated by Felix Schäfer almost 7 years ago
- File 27831-master.patch 27831-master.patch added
Go MAEDA wrote:
With the patch applied to the latest trunk r17140, I encountered the following error when I opened RepositoriesController#changes page. Could you take a look at it?
I can confirm the error, it seems there have been more changes regarding ATOM feeds in master than I thought. The previous patch I provided should work with current stable, not current trunk/master.
I have adapted the patch for master, please find the patch attached.
Updated by Go MAEDA almost 7 years ago
Felix, thank you for updating the patch. But I have not got atom feed yet.
I tested the patch with Redmine's bundled test fixtures and repositories. I get "404 The entry or revision was not found in the repository" error when I click "Atom" link on the changes page (e.g. /projects/ecookbook/repository/changes/subversion_test/helloworld.c).
I noticed two things while seeing the log. First, there is a line "Processing by .... as HTML". I think "HTML" should be "ATOM" because I tried to get an Atom feed. Second, the "path" parameter has a strange extension ".c.atom". Probably it should be ".c".
Started GET "/projects/ecookbook/repository/changes/subversion_test/helloworld.c .atom?key=253fb4856f8f7518efd462d9c41a8791be24698b" for 127.0.0.1 at 2018-01-11 05:54:29 +0000 Processing by RepositoriesController#changes as HTML Parameters: {"key"=>"253fb4856f8f7518efd462d9c41a8791be24698b", "id"=>"ecookbo ok", "path"=>"subversion_test/helloworld.c.atom"} . (snip) . Completed 404 Not Found in 137ms (Views: 81.1ms | ActiveRecord: 9.9ms)
Updated by Yuichi HARADA almost 5 years ago
- File 27831-fixed.patch 27831-fixed.patch added
I fixed Felix's patch 27831-master.patch (mainly config/routes.rb). I attached a fixed patch.
Go MAEDA wrote:
I tested the patch with Redmine's bundled test fixtures and repositories. I get "404 The entry or revision was not found in the repository" error when I click "Atom" link on the changes page (e.g. /projects/ecookbook/repository/changes/subversion_test/helloworld.c).
I did a similar test. The ATOM feed has been output.
Started GET "/projects/ecookbook/repository/10/changes/subversion_test/helloworld.c.atom?key=0bff9fd16476ad80fac510da47667ac16c2acb43" for 127.0.0.1 at 2020-01-07 09:37:29 +0900 Processing by RepositoriesController#changes as ATOM Parameters: {"key"=>"0bff9fd16476ad80fac510da47667ac16c2acb43", "id"=>"ecookbook", "repository_id"=>"10", "path"=>"subversion_test/helloworld.c"} .. Rendering common/feed.atom.builder (snip) Rendered common/feed.atom.builder (19.8ms) .. Completed 200 OK in 85ms (Views: 21.2ms | ActiveRecord: 4.9ms)
Updated by Go MAEDA almost 5 years ago
- Status changed from Needs feedback to New
- Target version set to Candidate for next major release