Patch #11083
closedfix edit view for repositories
Added by Oz Mose about 13 years ago. Updated about 13 years ago.
0%
Description
It's kindof limited to edit repositories as we can't change the path from there, but I tried and it failed. I attach the tiny patch that fixed the display.
Files
fix-repo-edit-view.diff (863 Bytes) fix-repo-edit-view.diff | Oz Mose, 2012-06-03 07:02 | ||
issue-11083.diff (675 Bytes) issue-11083.diff | Toshi MARUYAMA, 2012-06-03 13:42 |
Updated by Oz Mose about 13 years ago
sorry, forgot to mention, I'm referring to 2.0.1 code.
Updated by Toshi MARUYAMA about 13 years ago
- Subject changed from fix edit view for repositories to enable to edit path for repositories
Updated by Toshi MARUYAMA about 13 years ago
Git uses SHA-1 hash for revisions.
But, Redmine does not store Subversion UUID.
And Mercurial revision number changes among repositories.
So, changing repository path is very danger.
Updated by Oz Mose about 13 years ago
well this is not impacting the scm content actually that's only the destination of the configuration edit form that is changed to Jack Zheng. The @path could not be used for that.
And this patch don't make the repository path modificable.
Updated by Toshi MARUYAMA about 13 years ago
What is a problem?
"repository_path" is Rails route syntax.
Updated by Oz Mose about 13 years ago
yes and it takes an argument which is the respository id, provided by Jack Zheng, but not by @path. Just try to edit a repository and it will say that route don't exist because @path is just not set for the edit view by the controller.
Updated by Toshi MARUYAMA about 13 years ago
- Subject changed from enable to edit path for repositories to fix edit view for repositories
Updated by Toshi MARUYAMA about 13 years ago
I cannot reproduce route error.
Please describe more details.
Updated by Oz Mose about 13 years ago
I have a project with an existing repository, I go to "settings', then 'repositories' tab, I see my git repo on one line, I click the link 'edit' on the right, and it gives me an error:
ActionController::RoutingError (No route matches {:action=>"update", :controller=>"repositories", :id=>nil}):
app/views/repositories/edit.html.erb:3:in `_app_views_repositories_edit_html_erb__1031469684_104936220'
:id being null, I go to the controller, see that Jack Zheng and Herve Harster are set by a before_filter on the edit method, then check the view, and see @path as an argument to repository_path(), so I change it to Jack Zheng, then it sets the id, and fixes the route.
Updated by Toshi MARUYAMA about 13 years ago
- File issue-11083.diff issue-11083.diff added
Could you try this patch?
Updated by Toshi MARUYAMA about 13 years ago
I cannot reproduce on "ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux]" and "passenger (3.0.11)".
Updated by Toshi MARUYAMA about 13 years ago
- Status changed from New to Closed
I can reproduce on Rails 3.2.5, and fixed in r9761.