diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-05-03 14:49:29 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-05-03 14:49:29 +0000 |
commit | b4350ca91abef0a031e89984bf17fa55e3db0b86 (patch) | |
tree | 056badd073c9812c266202f8e8879609325275f8 /config | |
parent | 2c28d6b5d11d69b6e83517113aaa71c246391c16 (diff) | |
download | redmine-b4350ca91abef0a031e89984bf17fa55e3db0b86.tar.gz redmine-b4350ca91abef0a031e89984bf17fa55e3db0b86.zip |
route: scm: fix git and mercurial changes action
If branch name has special character, "View revisions" link has route error.
For example, Redmine Mercurial hgsubversion mirror has "../sandbox/rails-3.2" named branch.
Git default branch of bare repository is defined at HEAD.
In most cases, it is *master*.
Mercurial GUI standard behavior is showing all revisions on top page.
So, Redmine default branch is *nil*.
Mercurial top page "View revisions" link has route error.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9617 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb index 94f978bdd..22c61acb8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -214,6 +214,9 @@ RedmineApp::Application.routes.draw do get 'projects/:id/repository/:repository_id/statistics', :to => 'repositories#stats' get 'projects/:id/repository/:repository_id/graph', :to => 'repositories#graph' + get 'projects/:id/repository/:repository_id/changes(/*path(.:ext))', + :to => 'repositories#changes' + get 'projects/:id/repository/:repository_id/revisions/:rev', :to => 'repositories#revision' get 'projects/:id/repository/:repository_id/revision', :to => 'repositories#revision' post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue' @@ -228,13 +231,16 @@ RedmineApp::Application.routes.draw do get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))', :controller => 'repositories', :constraints => { - :action => /(browse|show|entry|changes|annotate|diff)/, + :action => /(browse|show|entry|annotate|diff)/, :rev => /[a-z0-9\.\-_]+/ } get 'projects/:id/repository/statistics', :to => 'repositories#stats' get 'projects/:id/repository/graph', :to => 'repositories#graph' + get 'projects/:id/repository/changes(/*path(.:ext))', + :to => 'repositories#changes' + get 'projects/:id/repository/revisions', :to => 'repositories#revisions' get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision' get 'projects/:id/repository/revision', :to => 'repositories#revision' @@ -249,7 +255,7 @@ RedmineApp::Application.routes.draw do get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))', :controller => 'repositories', :constraints => { - :action => /(browse|show|entry|changes|annotate|diff)/, + :action => /(browse|show|entry|annotate|diff)/, :rev => /[a-z0-9\.\-_]+/ } get 'projects/:id/repository/:repository_id/:format(/*path(.:ext))', :to => 'repositories#entry', :format => /raw/ |