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
8b6a075e
Commit
8b6a075e
authored
Aug 02, 2016
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement commit in merge conflicts UI.
parent
c2295fbd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
6 deletions
+25
-6
app/assets/javascripts/merge_conflict_data_provider.js.es6
app/assets/javascripts/merge_conflict_data_provider.js.es6
+9
-1
app/assets/javascripts/merge_conflict_resolver.js.es6
app/assets/javascripts/merge_conflict_resolver.js.es6
+10
-0
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+1
-1
app/views/projects/merge_requests/conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+5
-4
No files found.
app/assets/javascripts/merge_conflict_data_provider.js.es6
View file @
8b6a075e
...
...
@@ -26,7 +26,7 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
}
else {
data.shortCommitSha = data.commit_sha.slice(0, 7);
data.commitMes
age
= data.commit_message;
data.commitMes
sage
= data.commit_message;
this.setParallelLines(data);
this.setInlineLines(data);
...
...
@@ -284,4 +284,12 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
vueInstance.conflictsData.errorMessage = 'Something went wrong!';
}
getCommitData() {
return {
commitMessage: this.vueInstance.conflictsData.commitMessage,
sections: this.vueInstance.resolutionData
}
}
}
app/assets/javascripts/merge_conflict_resolver.js.es6
View file @
8b6a075e
...
...
@@ -22,6 +22,9 @@ window.MergeConflictResolver = class MergeConflictResolver {
},
handleViewTypeChange(newType) {
that.dataProvider.updateViewType(newType);
},
commit() {
that.commit();
}
}
})
...
...
@@ -54,4 +57,11 @@ window.MergeConflictResolver = class MergeConflictResolver {
}
}
commit() {
$.post('./resolve_conflicts', this.dataProvider.getCommitData())
.always( (data) => {
console.log(data)
})
}
}
app/assets/javascripts/merge_request_tabs.js
View file @
8b6a075e
...
...
@@ -81,7 +81,7 @@
if
(
action
===
'
show
'
)
{
action
=
'
notes
'
;
}
new_state
=
this
.
_location
.
pathname
.
replace
(
/
\/(
commits|diffs|builds
|conflicts
)(\.
html
)?\/?
$/
,
''
);
new_state
=
this
.
_location
.
pathname
.
replace
(
/
\/(
commits|diffs|builds
)(\.
html
)?\/?
$/
,
''
);
if
(
action
!==
'
notes
'
)
{
new_state
+=
"
/
"
+
action
;
}
...
...
app/views/projects/merge_requests/conflicts.html.haml
View file @
8b6a075e
...
...
@@ -107,10 +107,11 @@
.commit-message-container.form-group
.max-width-marker
%textarea
.form-control.js-commit-message
{
":disabled"
=>
"!allResolved"
}
{{{conflictsData.commitMessage}}}
%textarea
.form-control.js-commit-message
{
":disabled"
=>
"!allResolved"
,
"v-model"
=>
"conflictsData.commitMessage"
}
{{{conflictsData.commitMessage}}}
%button
{
type:
'button'
,
class:
'btn btn-success js-submit-button'
,
":disabled"
=>
"!allResolved"
}
%button
{
type:
'button'
,
class:
'btn btn-success js-submit-button'
,
":disabled"
=>
"!allResolved"
,
"@click"
=>
"commit()"
}
Commit conflict resolution
%button
{
type:
'button'
,
class:
'btn btn-cancel'
}
Cancel
/
%button{type: 'button', class: 'btn btn-cancel'}
/
Cancel
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