Feature Request: Allow slash (/) in project path
Created by: cinderblock
While the current namespace implementation was partially an attempt to fix this (and #176 (closed)), it doesn't address the actual issue of allowing grandparent folders. Gitolite supports repositories deep in directory trees, so should gitlab.
I've starting hacking my installation to see if I can make it work, but I'm no Ruby developer so I'm not sure how far I'll get.
It was trivial to change the project model and view to add explicit setting of the project's path on creation and add an appropriate regex validation that allows slashes. Project creation seems to go quite cleanly.
The next step is getting the project views to work with added slashes since when you try to view such a project, because currently it just dumps a 404 page. Examining the production.log suggests routes are already setup properly because the entire request is getting passed onto the ProjectController's show method, which then fails and redirects to a 404.
gitlab@computer ~/gitlab $ tail log/production.log Started GET "/user/group/project" for 123.45.67.89 at 2013-01-14 16:56:39 -0800 Processing by ProjectsController#show as HTML Parameters: {"id"=>"user/group/project"} Rendered public/404.html (0.0ms) Filter chain halted as :project rendered or redirected Completed 404 Not Found in 2ms (Views: 0.3ms | ActiveRecord: 0.7ms)
If that log output is not saying what I think it is, Route Globbing seems to be the correct tool to do what is needed.
Am I on the right track for what needs to be changed? I am not a Ruby developer but will continue to hack at this. Are there other things happening that I should watch out for?
I can think of issues arising if certain malicious project names are used, but that can be taken care of with a warning.