BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e47e537b
Commit
e47e537b
authored
Aug 02, 2016
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle renamed files in file header.
parent
29bed996
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
merge_conflict_data_provider.js.es6
app/assets/javascripts/merge_conflict_data_provider.js.es6
+8
-0
conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+3
-2
No files found.
app/assets/javascripts/merge_conflict_data_provider.js.es6
View file @
e47e537b
...
...
@@ -52,6 +52,7 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
setParallelLines(data) {
data.files.forEach( (file) => {
file.filePath = this.getFilePath(file);
file.parallelLines = { left: [], right: [] };
file.sections.forEach( (section) => {
...
...
@@ -110,6 +111,7 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
setInlineLines(data) {
data.files.forEach( (file) => {
file.inlineLines = []
file.filePath = this.getFilePath(file);
file.sections.forEach( (section) => {
let currentLineType = 'new';
...
...
@@ -292,4 +294,10 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
}
}
getFilePath(file) {
const { old_path, new_path } = file;
return old_path === new_path ? new_path : `${old_path} → ${new_path}`;
}
}
app/views/projects/merge_requests/conflicts.html.haml
View file @
e47e537b
...
...
@@ -39,7 +39,7 @@
.files
{
"v-if"
=>
"isParallel"
}
.diff-file.file-holder.conflict.parallel-view
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
%span
{{
file.new_path
}}
%span
{{
{file.filePath}
}}
.file-actions
%a
.btn.btn-sm
View file @{{conflictsData.shortCommitSha}}
...
...
@@ -66,10 +66,11 @@
%td
.line_content
{{{line.richText}}}
.files
{
"v-if"
=>
"!isParallel"
}
.diff-file.file-holder.conflict.inline-view
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
%span
{{
file.new_path
}}
%span
{{
{file.filePath}
}}
.file-actions
%a
.btn.btn-sm
View file @{{conflictsData.shortCommitSha}}
...
...
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