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
3dd7ad50
Unverified
Commit
3dd7ad50
authored
Oct 12, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve mr compare message when base is different
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
d0fb1835
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+1
-2
merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+4
-0
_versions.html.haml
app/views/projects/merge_requests/show/_versions.html.haml
+5
-2
No files found.
app/assets/stylesheets/pages/merge_requests.scss
View file @
3dd7ad50
...
...
@@ -402,12 +402,11 @@
}
.content-block
{
border-top
:
1px
solid
$border-color
;
padding
:
$gl-padding-top
$gl-padding
;
}
.comments-disabled-notif
{
border-top
:
1px
solid
$border-color
;
.btn
{
margin-left
:
5px
;
}
...
...
app/helpers/merge_requests_helper.rb
View file @
3dd7ad50
...
...
@@ -123,4 +123,8 @@ module MergeRequestsHelper
def
version_index
(
merge_request_diff
)
@merge_request_diffs
.
size
-
@merge_request_diffs
.
index
(
merge_request_diff
)
end
def
different_base?
(
version1
,
version2
)
version1
&&
version2
&&
version1
.
base_commit_sha
!=
version2
.
base_commit_sha
end
end
app/views/projects/merge_requests/show/_versions.html.haml
View file @
3dd7ad50
...
...
@@ -64,13 +64,16 @@
#{
@merge_request
.
target_branch
}
(base)
.monospace
#{
short_sha
(
@merge_request_diff
.
base_commit_sha
)
}
-
if
@start_version
&&
@start_version
.
base_commit_sha
!=
@merge_request_diff
.
base_commit_sha
-
if
different_base?
(
@start_version
,
@merge_request_diff
)
.content-block
=
icon
(
'info-circle'
)
Selected versions have different base commits.
Changes will include
=
link_to
namespace_project_compare_path
(
@project
.
namespace
,
@project
,
from:
@start_version
.
base_commit_sha
,
to:
@merge_request_diff
.
base_commit_sha
)
do
new commits
from
#{
@merge_request
.
target_branch
}
from
%code
#{
@merge_request
.
target_branch
}
-
unless
@merge_request_diff
.
latest?
&&
!
@start_sha
.comments-disabled-notif.content-block
=
icon
(
'info-circle'
)
...
...
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