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
e47e537b
Commit
e47e537b
authored
8 years ago
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle renamed files in file header.
parent
29bed996
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
app/assets/javascripts/merge_conflict_data_provider.js.es6
app/assets/javascripts/merge_conflict_data_provider.js.es6
+8
-0
app/views/projects/merge_requests/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}`;
}
}
This diff is collapsed.
Click to expand it.
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}}
...
...
This diff is collapsed.
Click to expand it.
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