summaryrefslogtreecommitdiffstats
path: root/config/routes.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-01-21 05:16:02 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-01-21 05:16:02 +0000
commit58ece4b887dc0793bfb39aaba76b279fd7e3b256 (patch)
tree4506c71f2dbb140e394fbdc34b84e3ac9fc2b64c /config/routes.rb
parentf8d9254b64be21b9800ca4e6b29d210dc9bc266a (diff)
downloadredmine-58ece4b887dc0793bfb39aaba76b279fd7e3b256.tar.gz
redmine-58ece4b887dc0793bfb39aaba76b279fd7e3b256.zip
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
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 1a02d02c3..3cee3242b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -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',