Project

General

Profile

Actions

Patch #11083

closed

fix edit view for repositories

Added by Oz Mose about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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
Actions #1

Updated by Oz Mose about 13 years ago

sorry, forgot to mention, I'm referring to 2.0.1 code.

Actions #2

Updated by Toshi MARUYAMA about 13 years ago

  • Subject changed from fix edit view for repositories to enable to edit path for repositories
Actions #3

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.

Actions #4

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.

Actions #5

Updated by Toshi MARUYAMA about 13 years ago

What is a problem?
"repository_path" is Rails route syntax.

Actions #6

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.

Actions #7

Updated by Toshi MARUYAMA about 13 years ago

  • Subject changed from enable to edit path for repositories to fix edit view for repositories
Actions #8

Updated by Toshi MARUYAMA about 13 years ago

I cannot reproduce route error.
Please describe more details.

Actions #9

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.

Actions #10

Updated by Toshi MARUYAMA about 13 years ago

Could you try this patch?

Actions #11

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)".

Actions #12

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.

Actions

Also available in: Atom PDF