Defect #39747 » 39747.diff
| app/views/repositories/diff.html.erb | ||
|---|---|---|
|
<% end -%>
|
||
|
<% other_formats_links do |f| %>
|
||
|
<%= f.link_to_with_query_parameters 'Diff', {}, :caption => 'Unified diff' %>
|
||
|
<%= f.link_to_with_query_parameters 'Diff', { path: nil }, :caption => 'Unified diff' %>
|
||
|
<% end %>
|
||
|
<% html_title(with_leading_slash(@path), 'Diff') -%>
|
||
| config/routes.rb | ||
|---|---|---|
|
get "projects/:id/repository/:repository_id/revisions/:rev/diff(/*path)",
|
||
|
:to => 'repositories#diff',
|
||
|
:format => false,
|
||
|
:constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/}
|
||
|
:format => 'html',
|
||
|
:constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/, format: /(html|diff)/ }
|
||
|
get "projects/:id/repository/:repository_id/diff(/*path)",
|
||
|
:to => 'repositories#diff',
|
||
|
:format => false,
|
||
|
:constraints => {:path => /.*/}
|
||
|
:format => 'html',
|
||
|
:constraints => {:path => /.*/, format: /(html|diff)/ }
|
||
|
get 'projects/:id/repository/:repository_id/show/*path', :to => 'repositories#show', :format => 'html', :constraints => {:path => /.*/}
|
||
| test/integration/routing/repositories_test.rb | ||
|---|---|---|
|
should_route 'GET /projects/foo/repository/foo/revisions/2457' => 'repositories#revision', :id => 'foo', :repository_id => 'foo', :rev => '2457'
|
||
|
should_route 'GET /projects/foo/repository/foo/revisions/2457/show' => 'repositories#show', :id => 'foo', :repository_id => 'foo', :rev => '2457', :format => 'html'
|
||
|
should_route 'GET /projects/foo/repository/foo/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :repository_id => 'foo', :rev => '2457'
|
||
|
should_route 'GET /projects/foo/repository/foo/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :repository_id => 'foo', :rev => '2457', :format => 'html'
|
||
|
%w(show entry raw annotate).each do |action|
|
||
|
@paths.each do |path|
|
||
| ... | ... | |
|
end
|
||
|
@paths.each do |path|
|
||
|
should_route "GET /projects/foo/repository/foo/revisions/2457/diff/#{path}" => "repositories#diff",
|
||
|
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => path
|
||
|
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => path, :format => 'html'
|
||
|
end
|
||
|
end
|
||
| ... | ... | |
|
end
|
||
|
@paths.each do |path|
|
||
|
should_route "GET /projects/foo/repository/svn/diff/#{path}" => "repositories#diff",
|
||
|
:id => 'foo', :repository_id => 'svn', :path => path
|
||
|
:id => 'foo', :repository_id => 'svn', :path => path, :format => 'html'
|
||
|
end
|
||
|
end
|
||