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
Boxiang Sun
gitlab-ce
Commits
06a2e385
Commit
06a2e385
authored
May 11, 2018
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it explicit that merge conflict feature commits to source branch
parent
c6f72ac9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
10 deletions
+22
-10
app/assets/javascripts/merge_conflicts/merge_conflict_store.js
...ssets/javascripts/merge_conflicts/merge_conflict_store.js
+1
-1
app/assets/stylesheets/pages/merge_conflicts.scss
app/assets/stylesheets/pages/merge_conflicts.scss
+9
-1
app/views/projects/merge_requests/conflicts/_submit_form.html.haml
.../projects/merge_requests/conflicts/_submit_form.html.haml
+8
-4
doc/user/project/merge_requests/resolve_conflicts.md
doc/user/project/merge_requests/resolve_conflicts.md
+1
-1
spec/features/merge_request/user_resolves_conflicts_spec.rb
spec/features/merge_request/user_resolves_conflicts_spec.rb
+3
-3
No files found.
app/assets/javascripts/merge_conflicts/merge_conflict_store.js
View file @
06a2e385
...
@@ -351,7 +351,7 @@ import Cookies from 'js-cookie';
...
@@ -351,7 +351,7 @@ import Cookies from 'js-cookie';
},
},
getCommitButtonText
()
{
getCommitButtonText
()
{
const
initial
=
'
Commit
conflict resolution
'
;
const
initial
=
'
Commit
to source branch
'
;
const
inProgress
=
'
Committing...
'
;
const
inProgress
=
'
Committing...
'
;
return
this
.
state
?
this
.
state
.
isSubmitting
?
inProgress
:
initial
:
initial
;
return
this
.
state
?
this
.
state
.
isSubmitting
?
inProgress
:
initial
:
initial
;
...
...
app/assets/stylesheets/pages/merge_conflicts.scss
View file @
06a2e385
...
@@ -286,6 +286,14 @@ $colors: (
...
@@ -286,6 +286,14 @@ $colors: (
}
}
.resolve-conflicts-form
{
.resolve-conflicts-form
{
padding-top
:
$gl-padding
;
h4
{
margin-top
:
0
;
}
.resolve-info
{
@media
(
max-width
:
$screen-md-max
)
{
margin-bottom
:
$gl-padding
;
}
}
}
}
}
}
app/views/projects/merge_requests/conflicts/_submit_form.html.haml
View file @
06a2e385
%hr
.form-horizontal.resolve-conflicts-form
.form-horizontal.resolve-conflicts-form
.form-group
.form-group
%label
.col-sm-2.control-label
{
"for"
=>
"commit-message"
}
.col-md-4
%h4
Resolve conflicts on source branch
.resolve-info
Resolve the merge conflict by choosing Ours or Theirs in all the conflicted files above. Commit these changes into {{conflictsData.sourceBranch}}.
.col-md-8
%label
.label-light
{
"for"
=>
"commit-message"
}
#{
_
(
'Commit message'
)
}
#{
_
(
'Commit message'
)
}
.col-sm-10
.commit-message-container
.commit-message-container
.max-width-marker
.max-width-marker
%textarea
.form-control.js-commit-message
#commit-message
{
"v-model"
=>
"conflictsData.commitMessage"
,
"rows"
=>
"5"
}
%textarea
.form-control.js-commit-message
#commit-message
{
"v-model"
=>
"conflictsData.commitMessage"
,
"rows"
=>
"5"
}
.form-group
.form-group
.col-
sm-offset-2.col-sm-10
.col-
md-offset-4.col-md-8
.row
.row
.col-xs-6
.col-xs-6
%button
.btn.btn-success.js-submit-button
{
type:
"button"
,
"@click"
=>
"commit()"
,
":disabled"
=>
"!readyToCommit"
}
%button
.btn.btn-success.js-submit-button
{
type:
"button"
,
"@click"
=>
"commit()"
,
":disabled"
=>
"!readyToCommit"
}
...
...
doc/user/project/merge_requests/resolve_conflicts.md
View file @
06a2e385
...
@@ -29,7 +29,7 @@ The merge conflict resolution editor allows for more complex merge conflicts,
...
@@ -29,7 +29,7 @@ The merge conflict resolution editor allows for more complex merge conflicts,
which require the user to manually modify a file in order to resolve a conflict,
which require the user to manually modify a file in order to resolve a conflict,
to be solved right form the GitLab interface. Use the
**Edit inline**
button
to be solved right form the GitLab interface. Use the
**Edit inline**
button
to open the editor. Once you're sure about your changes, hit the
to open the editor. Once you're sure about your changes, hit the
**Commit
conflict resolution
**
button.
**Commit
to source branch
**
button.
![
Merge conflict editor
](
img/merge_conflict_editor.png
)
![
Merge conflict editor
](
img/merge_conflict_editor.png
)
...
...
spec/features/merge_request/user_resolves_conflicts_spec.rb
View file @
06a2e385
...
@@ -27,7 +27,7 @@ describe 'Merge request > User resolves conflicts', :js do
...
@@ -27,7 +27,7 @@ describe 'Merge request > User resolves conflicts', :js do
end
end
end
end
find_button
(
'Commit
conflict resolution
'
).
send_keys
(
:return
)
find_button
(
'Commit
to source branch
'
).
send_keys
(
:return
)
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
merge_request
.
reload_diff
merge_request
.
reload_diff
...
@@ -71,7 +71,7 @@ describe 'Merge request > User resolves conflicts', :js do
...
@@ -71,7 +71,7 @@ describe 'Merge request > User resolves conflicts', :js do
execute_script
(
'ace.edit($(".files-wrapper .diff-file pre")[1]).setValue("Gregor Samsa woke from troubled dreams");'
)
execute_script
(
'ace.edit($(".files-wrapper .diff-file pre")[1]).setValue("Gregor Samsa woke from troubled dreams");'
)
end
end
find_button
(
'Commit
conflict resolution
'
).
send_keys
(
:return
)
find_button
(
'Commit
to source branch
'
).
send_keys
(
:return
)
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
merge_request
.
reload_diff
merge_request
.
reload_diff
...
@@ -145,7 +145,7 @@ describe 'Merge request > User resolves conflicts', :js do
...
@@ -145,7 +145,7 @@ describe 'Merge request > User resolves conflicts', :js do
execute_script
(
'ace.edit($(".files-wrapper .diff-file pre")[0]).setValue("Gregor Samsa woke from troubled dreams");'
)
execute_script
(
'ace.edit($(".files-wrapper .diff-file pre")[0]).setValue("Gregor Samsa woke from troubled dreams");'
)
end
end
click_button
'Commit
conflict resolution
'
click_button
'Commit
to source branch
'
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
...
...
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