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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f9643949
Commit
f9643949
authored
Mar 28, 2021
by
Abhishek Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failling tests
parent
025a4ba7
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
12 deletions
+23
-12
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+2
-0
app/assets/javascripts/diffs/components/compare_dropdown_layout.vue
.../javascripts/diffs/components/compare_dropdown_layout.vue
+3
-1
app/assets/javascripts/diffs/store/getters_versions_dropdowns.js
...ets/javascripts/diffs/store/getters_versions_dropdowns.js
+2
-2
app/models/context_commits_diff.rb
app/models/context_commits_diff.rb
+3
-3
app/models/merge_request.rb
app/models/merge_request.rb
+1
-0
app/serializers/context_commits_diff_entity.rb
app/serializers/context_commits_diff_entity.rb
+2
-2
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/controllers/projects/merge_requests/diffs_controller_spec.rb
...trollers/projects/merge_requests/diffs_controller_spec.rb
+6
-3
spec/serializers/diffs_metadata_entity_spec.rb
spec/serializers/diffs_metadata_entity_spec.rb
+1
-1
No files found.
.rubocop_manual_todo.yml
View file @
f9643949
...
...
@@ -1566,6 +1566,7 @@ Gitlab/NamespacedClass:
-
'
app/models/concerns/uniquify.rb'
-
'
app/models/container_expiration_policy.rb'
-
'
app/models/container_repository.rb'
-
'
app/models/context_commits_diff.rb'
-
'
app/models/custom_emoji.rb'
-
'
app/models/data_list.rb'
-
'
app/models/deploy_key.rb'
...
...
@@ -1980,6 +1981,7 @@ Gitlab/NamespacedClass:
-
'
app/serializers/container_repository_entity.rb'
-
'
app/serializers/container_tag_entity.rb'
-
'
app/serializers/container_tags_serializer.rb'
-
'
app/serializers/context_commits_diff_entity.rb'
-
'
app/serializers/current_board_entity.rb'
-
'
app/serializers/current_board_serializer.rb'
-
'
app/serializers/current_user_entity.rb'
...
...
app/assets/javascripts/diffs/components/compare_dropdown_layout.vue
View file @
f9643949
...
...
@@ -40,7 +40,9 @@ export default {
<strong>
{{
version
.
versionName
}}
<template
v-if=
"version.isHead"
>
{{
s__
(
'
DiffsCompareBaseBranch|(HEAD)
'
)
}}
</
template
>
<
template
v-else-if=
"version.isBase"
>
{{
s__
(
'
DiffsCompareBaseBranch|(base)
'
)
}}
</
template
>
<
template
v-else-if=
"version.isBase"
>
{{
s__
(
'
DiffsCompareBaseBranch|(base)
'
)
}}
</
template
>
</strong>
</div>
<div>
...
...
app/assets/javascripts/diffs/store/getters_versions_dropdowns.js
View file @
f9643949
...
...
@@ -7,7 +7,6 @@ export const selectedTargetIndex = (state) =>
export
const
selectedSourceIndex
=
(
state
)
=>
state
.
mergeRequestDiff
.
version_index
;
export
const
selectedContextCommitsDiffs
=
(
state
)
=>
state
.
contextCommitsDiff
&&
state
.
contextCommitsDiff
.
showing_context_commits_diff
;
...
...
@@ -73,7 +72,8 @@ export const diffCompareDropdownSourceVersions = (state, getters) => {
versionName
:
isLatestVersion
?
__
(
'
latest version
'
)
:
sprintf
(
__
(
`version %{versionIndex}`
),
{
versionIndex
:
v
.
version_index
}),
selected
:
v
.
version_index
===
getters
.
selectedSourceIndex
&&
!
getters
.
selectedContextCommitsDiffs
,
selected
:
v
.
version_index
===
getters
.
selectedSourceIndex
&&
!
getters
.
selectedContextCommitsDiffs
,
};
});
...
...
app/models/context_commits_diff.rb
View file @
f9643949
...
...
@@ -43,8 +43,8 @@ class ContextCommitsDiff
@compare
||=
Gitlab
::
Git
::
Compare
.
new
(
merge_request
.
project
.
repository
.
raw_repository
,
commits
.
last
.
diff_refs
.
base_sha
,
commits
.
first
.
diff_refs
.
head_sha
commits
.
last
&
.
diff_refs
&
.
base_sha
,
commits
.
first
&
.
diff_refs
&
.
head_sha
)
end
...
...
app/models/merge_request.rb
View file @
f9643949
...
...
@@ -1904,6 +1904,7 @@ class MergeRequest < ApplicationRecord
ContextCommitsDiff
.
new
(
self
)
end
end
private
def
missing_report_error
(
report_type
)
...
...
app/serializers/context_commits_diff_entity.rb
View file @
f9643949
locale/gitlab.pot
View file @
f9643949
...
...
@@ -38396,6 +38396,9 @@ msgid_plural "points"
msgstr[0] ""
msgstr[1] ""
msgid "previously merged commits"
msgstr ""
msgid "private"
msgstr ""
...
...
spec/controllers/projects/merge_requests/diffs_controller_spec.rb
View file @
f9643949
...
...
@@ -180,7 +180,8 @@ RSpec.describe Projects::MergeRequests::DiffsController do
start_version:
nil
,
start_sha:
nil
,
commit:
nil
,
latest_diff:
true
latest_diff:
true
,
only_context_commits:
false
}
expect_next_instance_of
(
DiffsMetadataSerializer
)
do
|
instance
|
...
...
@@ -261,7 +262,8 @@ RSpec.describe Projects::MergeRequests::DiffsController do
start_version:
nil
,
start_sha:
nil
,
commit:
nil
,
latest_diff:
true
latest_diff:
true
,
only_context_commits:
false
}
expect_next_instance_of
(
DiffsMetadataSerializer
)
do
|
instance
|
...
...
@@ -290,7 +292,8 @@ RSpec.describe Projects::MergeRequests::DiffsController do
start_version:
nil
,
start_sha:
nil
,
commit:
merge_request
.
diff_head_commit
,
latest_diff:
nil
latest_diff:
nil
,
only_context_commits:
false
}
expect_next_instance_of
(
DiffsMetadataSerializer
)
do
|
instance
|
...
...
spec/serializers/diffs_metadata_entity_spec.rb
View file @
f9643949
...
...
@@ -28,7 +28,7 @@ RSpec.describe DiffsMetadataEntity do
:start_version
,
:latest_diff
,
:latest_version_path
,
:added_lines
,
:removed_lines
,
:render_overflow_warning
,
:email_patch_path
,
:plain_diff_path
,
:merge_request_diffs
,
:context_commits
,
:merge_request_diffs
,
:context_commits
,
:context_commits_diff
,
:definition_path_prefix
,
:source_branch_exists
,
:can_merge
,
:conflict_resolution_path
,
:has_conflicts
,
:project_name
,
:project_path
,
:user_full_name
,
:username
,
...
...
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