Browse Source

route: scm: add revision requirements for git/mercurial branches (#10026)

hgsubversion mirror (https://bitbucket.org/redmine/redmine-all) has
"../sandbox/rails-2.3" and "../sandbox/rails-2.2" *named* branches.

"View revisions" link of "../sandbox/rails-2.3" generates
"repository/revisions/..%2Fsandbox%2Frails-2.3/changes".
But, passenger returns "Not Found".

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8683 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/1.4.0
Toshi MARUYAMA 12 years ago
parent
commit
58ece4b887
1 changed files with 8 additions and 2 deletions
  1. 8
    2
      config/routes.rb

+ 8
- 2
config/routes.rb View File

@@ -250,7 +250,10 @@ ActionController::Routing::Routes.draw do |map|
repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path',
:action => 'entry', :format => 'raw'
repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path',
:requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ }
:requirements => {
:action => /(browse|show|entry|changes|annotate|diff)/,
:rev => /[a-z0-9\.\-_]+/
}
repository_views.connect 'projects/:id/repository/raw/*path',
:action => 'entry', :format => 'raw'
repository_views.connect 'projects/:id/repository/:action/*path',
@@ -274,7 +277,10 @@ ActionController::Routing::Routes.draw do |map|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/raw/*path',
:action => 'entry', :format => 'raw'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/:action/*path',
:requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ }
:requirements => {
:action => /(browse|show|entry|changes|annotate|diff)/,
:rev => /[a-z0-9\.\-_]+/
}
repository_views.connect 'projects/:id/repository/:repository_id/raw/*path',
:action => 'entry', :format => 'raw'
repository_views.connect 'projects/:id/repository/:repository_id/:action/*path',

Loading…
Cancel
Save