Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
7cffa980fef7
Commit
6d3bb508
authored
Dec 20, 2013
by
Dmitriy Zaporozhets
Browse files
Merge branch 'bug/mr_iids_duplicate' of /home/git/repositories/gitlab/gitlabhq
parents
79be4d63d2b5
623e8dfe218c
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/controllers/projects/merge_requests_controller.rb
View file @
7cffa980
...
...
@@ -94,6 +94,11 @@ def update
return
end
# We dont allow change of source/target projects
# after merge request was created
params
[
:merge_request
].
delete
(
:source_project_id
)
params
[
:merge_request
].
delete
(
:target_project_id
)
if
@merge_request
.
update_attributes
(
params
[
:merge_request
].
merge
(
author_id_of_changes:
current_user
.
id
))
@merge_request
.
reload_code
@merge_request
.
mark_as_unchecked
...
...
app/views/projects/merge_requests/_form.html.haml
View file @
7cffa980
...
...
@@ -10,7 +10,7 @@
.span5
.clearfix
.pull-left
=
f
.
select
(
:source_project_id
,[[
@merge_request
.
source_project_path
,
@merge_request
.
source_project
.
id
]]
,
{},
{
class:
'source_project chosen span3'
})
=
f
.
select
(
:source_project_id
,
[[
@merge_request
.
source_project_path
,
@merge_request
.
source_project
.
id
]]
,
{},
{
class:
'source_project chosen span3'
,
disabled:
@merge_request
.
persisted?
})
.pull-left
=
f
.
select
(
:source_branch
,
@merge_request
.
source_project
.
repository
.
branch_names
,
{
include_blank:
"Select branch"
},
{
class:
'source_branch chosen span2'
})
...
...
@@ -22,7 +22,7 @@
.clearfix
.pull-left
-
projects
=
@project
.
forked_from_project
.
nil?
?
[
@project
]
:
[
@project
,
@project
.
forked_from_project
]
=
f
.
select
(
:target_project_id
,
projects
.
map
{
|
proj
|
[
proj
.
path_with_namespace
,
proj
.
id
]
},
{
include_blank:
"Select Target Project"
},
{
class:
'target_project chosen span3'
})
=
f
.
select
(
:target_project_id
,
options_from_collection_for_select
(
projects
,
'id'
,
'path_with_namespace'
),
{},
{
class:
'target_project chosen span3'
,
disabled:
@merge_request
.
persisted?
})
.pull-left
=
f
.
select
(
:target_branch
,
@target_branches
,
{
include_blank:
"Select branch"
},
{
class:
'target_branch chosen span2'
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment