Commit 76e276cb authored by Tim Zallmann's avatar Tim Zallmann

Merge branch '44895-explicit-merge-conflict' into 'master'

Resolve "Make explicit that merge conflict feature commits to source branch"

Closes #44895

See merge request gitlab-org/gitlab-ce!18921
parents 4c63e904 add9defa
...@@ -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;
......
...@@ -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;
}
}
} }
} }
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
Showing Showing
%strong.cred {{conflictsCountText}} %strong.cred {{conflictsCountText}}
between between
%strong {{conflictsData.sourceBranch}} %strong.ref-name {{conflictsData.sourceBranch}}
and and
%strong {{conflictsData.targetBranch}} %strong.ref-name {{conflictsData.targetBranch}}
- branch_name = link_to @merge_request.source_branch, project_tree_path(@merge_request.project, @merge_request.source_branch), class: "ref-name"
- translation =_('You can resolve the merge conflict using either the Interactive mode, by choosing %{use_ours} or %{use_theirs} buttons, or by editing the files directly. Commit these changes into %{branch_name}') % { use_ours: '<code>Use Ours</code>', use_theirs: '<code>Use Theirs</code>', branch_name: branch_name }
%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
= translation.html_safe
.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" }
......
...@@ -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)
......
...@@ -8,8 +8,8 @@ msgid "" ...@@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gitlab 1.0.0\n" "Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-05-16 18:52+0200\n" "POT-Creation-Date: 2018-05-21 12:38-0700\n"
"PO-Revision-Date: 2018-05-16 18:52+0200\n" "PO-Revision-Date: 2018-05-21 12:38-0700\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
...@@ -82,6 +82,9 @@ msgstr[1] "" ...@@ -82,6 +82,9 @@ msgstr[1] ""
msgid "%{loadingIcon} Started" msgid "%{loadingIcon} Started"
msgstr "" msgstr ""
msgid "%{lock_path} is locked by GitLab User %{lock_user_id}"
msgstr ""
msgid "%{nip_domain} can be used as an alternative to a custom domain." msgid "%{nip_domain} can be used as an alternative to a custom domain."
msgstr "" msgstr ""
...@@ -1447,7 +1450,7 @@ msgstr "" ...@@ -1447,7 +1450,7 @@ msgstr ""
msgid "ContainerRegistry|With the Docker Container Registry integrated into GitLab, every project can have its own space to store its Docker images." msgid "ContainerRegistry|With the Docker Container Registry integrated into GitLab, every project can have its own space to store its Docker images."
msgstr "" msgstr ""
msgid "ContainerRegistry|You can also %{deploy_token} for read-only access to the registry images." msgid "ContainerRegistry|You can also use a %{deploy_token} for read-only access to the registry images."
msgstr "" msgstr ""
msgid "Continuous Integration and Deployment" msgid "Continuous Integration and Deployment"
...@@ -2487,6 +2490,9 @@ msgstr "" ...@@ -2487,6 +2490,9 @@ msgstr ""
msgid "Lock %{issuableDisplayName}" msgid "Lock %{issuableDisplayName}"
msgstr "" msgstr ""
msgid "Lock not found"
msgstr ""
msgid "Lock to current projects" msgid "Lock to current projects"
msgstr "" msgstr ""
...@@ -3407,6 +3413,9 @@ msgstr "" ...@@ -3407,6 +3413,9 @@ msgstr ""
msgid "Reset runners registration token" msgid "Reset runners registration token"
msgstr "" msgstr ""
msgid "Resolve conflicts on source branch"
msgstr ""
msgid "Resolve discussion" msgid "Resolve discussion"
msgstr "" msgstr ""
...@@ -4278,6 +4287,9 @@ msgstr "" ...@@ -4278,6 +4287,9 @@ msgstr ""
msgid "Toggle Sidebar" msgid "Toggle Sidebar"
msgstr "" msgstr ""
msgid "Toggle discussion"
msgstr ""
msgid "Toggle sidebar" msgid "Toggle sidebar"
msgstr "" msgstr ""
...@@ -4599,12 +4611,21 @@ msgstr "" ...@@ -4599,12 +4611,21 @@ msgstr ""
msgid "You can only edit files when you are on a branch" msgid "You can only edit files when you are on a branch"
msgstr "" msgstr ""
msgid "You can resolve the merge conflict using either the Interactive mode, by choosing %{use_ours} or %{use_theirs} buttons, or by editing the files directly. Commit these changes into %{branch_name}"
msgstr ""
msgid "You cannot write to this read-only GitLab instance." msgid "You cannot write to this read-only GitLab instance."
msgstr "" msgstr ""
msgid "You have no permissions"
msgstr ""
msgid "You have reached your project limit" msgid "You have reached your project limit"
msgstr "" msgstr ""
msgid "You must have master access to force delete a lock"
msgstr ""
msgid "You must sign in to star a project" msgid "You must sign in to star a project"
msgstr "" msgstr ""
......
...@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment