Revision 1355:3d01be97cb5a app/controllers
| app/controllers/repositories_controller.rb | ||
|---|---|---|
| 60 | 60 |
end |
| 61 | 61 |
|
| 62 | 62 |
def edit |
| 63 |
@repository = @project.repository |
|
| 64 |
params[:repository_scm]='Mercurial' |
|
| 65 |
if !@repository |
|
| 66 |
@repository = Repository.factory(params[:repository_scm]) |
|
| 67 |
@repository.project = @project if @repository |
|
| 68 |
end |
|
| 69 |
if request.post? && @repository |
|
| 70 |
attrs = pickup_extra_info |
|
| 71 |
@repository.safe_attributes = attrs[:attrs] |
|
| 72 |
if attrs[:attrs_extra].keys.any? |
|
| 73 |
@repository.merge_extra_info(attrs[:attrs_extra]) |
|
| 74 |
end |
|
| 75 |
@repository.project = @project |
|
| 76 |
redirect_to settings_project_path(@project, :tab => 'repositories') |
|
| 77 |
end |
|
| 78 | 63 |
end |
| 79 | 64 |
|
| 80 | 65 |
def update |
Also available in: Unified diff