Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
6d3bb508
Commit
6d3bb508
authored
Dec 20, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug/mr_iids_duplicate' of /home/git/repositories/gitlab/gitlabhq
parents
8bcb2ff2
1231a367
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+5
-0
app/views/projects/merge_requests/_form.html.haml
app/views/projects/merge_requests/_form.html.haml
+2
-2
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
6d3bb508
...
@@ -94,6 +94,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -94,6 +94,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController
return
return
end
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
))
if
@merge_request
.
update_attributes
(
params
[
:merge_request
].
merge
(
author_id_of_changes:
current_user
.
id
))
@merge_request
.
reload_code
@merge_request
.
reload_code
@merge_request
.
mark_as_unchecked
@merge_request
.
mark_as_unchecked
...
...
app/views/projects/merge_requests/_form.html.haml
View file @
6d3bb508
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
.span5
.span5
.clearfix
.clearfix
.pull-left
.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
.pull-left
=
f
.
select
(
:source_branch
,
@merge_request
.
source_project
.
repository
.
branch_names
,
{
include_blank:
"Select branch"
},
{
class:
'source_branch chosen span2'
})
=
f
.
select
(
:source_branch
,
@merge_request
.
source_project
.
repository
.
branch_names
,
{
include_blank:
"Select branch"
},
{
class:
'source_branch chosen span2'
})
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
.clearfix
.clearfix
.pull-left
.pull-left
-
projects
=
@project
.
forked_from_project
.
nil?
?
[
@project
]
:
[
@project
,
@project
.
forked_from_project
]
-
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
.pull-left
=
f
.
select
(
:target_branch
,
@target_branches
,
{
include_blank:
"Select branch"
},
{
class:
'target_branch chosen span2'
})
=
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