Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
f293d991
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f293d991
编写于
8月 11, 2015
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Merge branch 'mr-widget-text' into 'master'
This reverts commit
151d9fb3
, reversing changes made to
819d110c
.
上级
151d9fb3
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
98 addition
and
119 deletion
+98
-119
CHANGELOG
CHANGELOG
+0
-2
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+0
-4
app/views/projects/merge_requests/show/_how_to_merge.html.haml
...iews/projects/merge_requests/show/_how_to_merge.html.haml
+26
-29
app/views/projects/merge_requests/widget/_closed.html.haml
app/views/projects/merge_requests/widget/_closed.html.haml
+1
-4
app/views/projects/merge_requests/widget/_heading.html.haml
app/views/projects/merge_requests/widget/_heading.html.haml
+5
-5
app/views/projects/merge_requests/widget/_locked.html.haml
app/views/projects/merge_requests/widget/_locked.html.haml
+2
-3
app/views/projects/merge_requests/widget/_merged.html.haml
app/views/projects/merge_requests/widget/_merged.html.haml
+8
-16
app/views/projects/merge_requests/widget/_open.html.haml
app/views/projects/merge_requests/widget/_open.html.haml
+1
-1
app/views/projects/merge_requests/widget/open/_accept.html.haml
...ews/projects/merge_requests/widget/open/_accept.html.haml
+3
-3
app/views/projects/merge_requests/widget/open/_archived.html.haml
...s/projects/merge_requests/widget/open/_archived.html.haml
+1
-3
app/views/projects/merge_requests/widget/open/_check.html.haml
...iews/projects/merge_requests/widget/open/_check.html.haml
+2
-2
app/views/projects/merge_requests/widget/open/_conflicts.html.haml
.../projects/merge_requests/widget/open/_conflicts.html.haml
+9
-8
app/views/projects/merge_requests/widget/open/_missing_branch.html.haml
...ects/merge_requests/widget/open/_missing_branch.html.haml
+16
-16
app/views/projects/merge_requests/widget/open/_not_allowed.html.haml
...rojects/merge_requests/widget/open/_not_allowed.html.haml
+2
-4
app/views/projects/merge_requests/widget/open/_nothing.html.haml
...ws/projects/merge_requests/widget/open/_nothing.html.haml
+7
-7
app/views/projects/merge_requests/widget/open/_reload.html.haml
...ews/projects/merge_requests/widget/open/_reload.html.haml
+1
-6
app/views/projects/merge_requests/widget/open/_wip.html.haml
app/views/projects/merge_requests/widget/open/_wip.html.haml
+12
-4
app/views/shared/issuable/_form.html.haml
app/views/shared/issuable/_form.html.haml
+2
-2
未找到文件。
CHANGELOG
浏览文件 @
f293d991
...
@@ -44,8 +44,6 @@ v 7.14.0 (unreleased)
...
@@ -44,8 +44,6 @@ v 7.14.0 (unreleased)
- Fetch code from forks to refs/merge-requests/:id/head when merge request created
- Fetch code from forks to refs/merge-requests/:id/head when merge request created
- Remove satellites
- Remove satellites
- Remove comments and email addresses when publicly exposing ssh keys (Zeger-Jan van de Weg)
- Remove comments and email addresses when publicly exposing ssh keys (Zeger-Jan van de Weg)
- Improve MR merge widget text and UI consistency.
- Improve text in MR "How To Merge" modal.
- Cache all events
- Cache all events
v 7.13.3
v 7.13.3
...
...
app/assets/stylesheets/pages/merge_requests.scss
浏览文件 @
f293d991
...
@@ -182,7 +182,3 @@
...
@@ -182,7 +182,3 @@
.merge-request-form
.select2-container
{
.merge-request-form
.select2-container
{
width
:
250px
!
important
;
width
:
250px
!
important
;
}
}
#modal_merge_info
.modal-dialog
{
width
:
600px
;
}
app/views/projects/merge_requests/show/_how_to_merge.html.haml
浏览文件 @
f293d991
...
@@ -3,45 +3,42 @@
...
@@ -3,45 +3,42 @@
.modal-content
.modal-content
.modal-header
.modal-header
%a
.close
{
href:
"#"
,
"data-dismiss"
=>
"modal"
}
×
%a
.close
{
href:
"#"
,
"data-dismiss"
=>
"modal"
}
×
%h3
Check out, review and merge locally
%h3
How to merge
.modal-body
.modal-body
%p
-
if
@merge_request
.
for_fork?
%strong
Step 1.
-
source_remote
=
@merge_request
.
source_project
.
namespace
.
nil?
?
"source"
:
@merge_request
.
source_project
.
namespace
.
path
Fetch and check out the branch for this merge request
-
target_remote
=
@merge_request
.
target_project
.
namespace
.
nil?
?
"target"
:
@merge_request
.
target_project
.
namespace
.
path
%pre
.dark
%p
-
if
@merge_request
.
for_fork?
%strong
Step 1.
Fetch the code and create a new branch pointing to it
%pre
.dark
:preserve
:preserve
git fetch
#{
@merge_request
.
source_project
.
http_url_to_repo
}
#{
@merge_request
.
source_branch
}
git fetch
#{
@merge_request
.
source_project
.
http_url_to_repo
}
#{
@merge_request
.
source_branch
}
git checkout -b
#{
@merge_request
.
source_project_path
}
-
#{
@merge_request
.
source_branch
}
FETCH_HEAD
git checkout -b
#{
@merge_request
.
source_project_path
}
-
#{
@merge_request
.
source_branch
}
FETCH_HEAD
-
else
%p
:preserve
%strong
Step 2.
git fetch origin
Merge the branch and push the changes to GitLab
git checkout -b
#{
@merge_request
.
source_branch
}
origin/
#{
@merge_request
.
source_branch
}
%pre
.dark
%p
%strong
Step 2.
Review the changes locally
%p
%strong
Step 3.
Merge the branch and fix any conflicts that come up
%pre
.dark
-
if
@merge_request
.
for_fork?
:preserve
:preserve
git checkout
#{
@merge_request
.
target_branch
}
git checkout
#{
@merge_request
.
target_branch
}
git merge --no-ff
#{
@merge_request
.
source_project_path
}
-
#{
@merge_request
.
source_branch
}
git merge --no-ff
#{
@merge_request
.
source_project_path
}
-
#{
@merge_request
.
source_branch
}
-
else
git push origin
#{
@merge_request
.
target_branch
}
-
else
%p
%strong
Step 1.
Update the repo and checkout the branch we are going to merge
%pre
.dark
:preserve
git fetch origin
git checkout -b
#{
@merge_request
.
source_branch
}
origin/
#{
@merge_request
.
source_branch
}
%p
%strong
Step 2.
Merge the branch and push the changes to GitLab
%pre
.dark
:preserve
:preserve
git checkout
#{
@merge_request
.
target_branch
}
git checkout
#{
@merge_request
.
target_branch
}
git merge --no-ff
#{
@merge_request
.
source_branch
}
git merge --no-ff
#{
@merge_request
.
source_branch
}
%p
git push origin
#{
@merge_request
.
target_branch
}
%strong
Step 4.
Push the result of the merge to GitLab
%pre
.dark
:preserve
git push origin
#{
@merge_request
.
target_branch
}
-
unless
@merge_request
.
can_be_merged_by?
(
current_user
)
%p
Note that pushing to GitLab requires write access to this repository.
:javascript
:javascript
$
(
function
(){
$
(
function
(){
...
...
app/views/projects/merge_requests/widget/_closed.html.haml
浏览文件 @
f293d991
...
@@ -6,7 +6,4 @@
...
@@ -6,7 +6,4 @@
-
if
@merge_request
.
closed_event
-
if
@merge_request
.
closed_event
by
#{
link_to_member
(
@project
,
@merge_request
.
closed_event
.
author
,
avatar:
true
)
}
by
#{
link_to_member
(
@project
,
@merge_request
.
closed_event
.
author
,
avatar:
true
)
}
#{
time_ago_with_tooltip
(
@merge_request
.
closed_event
.
created_at
)
}
#{
time_ago_with_tooltip
(
@merge_request
.
closed_event
.
created_at
)
}
%p
%p
Changes were not merged into target branch
=
succeed
'.'
do
The changes were not merged into
%span
.label-branch
=
@merge_request
.
target_branch
app/views/projects/merge_requests/widget/_heading.html.haml
浏览文件 @
f293d991
...
@@ -3,26 +3,26 @@
...
@@ -3,26 +3,26 @@
-
[
:success
,
:skipped
,
:canceled
,
:failed
,
:running
,
:pending
].
each
do
|
status
|
-
[
:success
,
:skipped
,
:canceled
,
:failed
,
:running
,
:pending
].
each
do
|
status
|
.ci_widget
{
class:
"ci-#{status}"
,
style:
"display:none"
}
.ci_widget
{
class:
"ci-#{status}"
,
style:
"display:none"
}
-
if
status
==
:success
-
if
status
==
:success
-
status
=
"passed"
=
icon
(
"check-circle"
)
=
icon
(
"check-circle"
)
-
else
-
else
=
icon
(
"circle"
)
=
icon
(
"circle"
)
%span
CI build
#{
status
}
%span
CI build
#{
status
}
for
#{
@merge_request
.
last_commit_short_sha
}
.
for
#{
@merge_request
.
last_commit_short_sha
}
.
%span
.ci-coverage
%span
.ci-coverage
=
link_to
"View build
details
"
,
ci_build_details_path
(
@merge_request
),
:"data-no-turbolink"
=>
"data-no-turbolink"
=
link_to
"View build
page
"
,
ci_build_details_path
(
@merge_request
),
:"data-no-turbolink"
=>
"data-no-turbolink"
.ci_widget
.ci_widget
=
icon
(
"spinner spin"
)
=
icon
(
"spinner spin"
)
Checking
CI status for
#{
@merge_request
.
last_commit_short_sha
}
…
Checking
for CI status for
#{
@merge_request
.
last_commit_short_sha
}
.ci_widget.ci-not_found
{
style:
"display:none"
}
.ci_widget.ci-not_found
{
style:
"display:none"
}
=
icon
(
"times-circle"
)
=
icon
(
"times-circle"
)
Could not find CI status for
#{
@merge_request
.
last_commit_short_sha
}
.
%span
Can not find commit in the CI server
for
#{
@merge_request
.
last_commit_short_sha
}
.
.ci_widget.ci-error
{
style:
"display:none"
}
.ci_widget.ci-error
{
style:
"display:none"
}
=
icon
(
"times-circle"
)
=
icon
(
"times-circle"
)
Could
not connect to the CI server. Please check your settings and try again.
%span
Can
not connect to the CI server. Please check your settings and try again.
:coffeescript
:coffeescript
$ ->
$ ->
...
...
app/views/projects/merge_requests/widget/_locked.html.haml
浏览文件 @
f293d991
...
@@ -2,8 +2,7 @@
...
@@ -2,8 +2,7 @@
=
render
'projects/merge_requests/widget/heading'
=
render
'projects/merge_requests/widget/heading'
.mr-widget-body
.mr-widget-body
%h4
%h4
=
icon
(
"spinner spin"
)
Merge in progress...
Merge in progress
…
%p
%p
This merge request is in the process of being merged, during which time i
t is locked and cannot be closed.
Merging is in progress. While merging this reques
t is locked and cannot be closed.
app/views/projects/merge_requests/widget/_merged.html.haml
浏览文件 @
f293d991
...
@@ -7,31 +7,23 @@
...
@@ -7,31 +7,23 @@
by
#{
link_to_member
(
@project
,
@merge_request
.
merge_event
.
author
,
avatar:
true
)
}
by
#{
link_to_member
(
@project
,
@merge_request
.
merge_event
.
author
,
avatar:
true
)
}
#{
time_ago_with_tooltip
(
@merge_request
.
merge_event
.
created_at
)
}
#{
time_ago_with_tooltip
(
@merge_request
.
merge_event
.
created_at
)
}
%div
%div
-
if
!
@merge_request
.
source_branch_exists?
-
if
@source_branch
.
blank?
=
succeed
'.'
do
Source branch has been removed
The changes were merged into
%span
.label-branch
=
@merge_request
.
target_branch
The source branch has been removed.
-
elsif
can_remove_branch?
(
@merge_request
.
source_project
,
@merge_request
.
source_branch
)
-
elsif
can_remove_branch?
(
@merge_request
.
source_project
,
@merge_request
.
source_branch
)
&&
@merge_request
.
merged?
.remove_source_branch_widget
.remove_source_branch_widget
%p
%p
Changes merged into
#{
@merge_request
.
target_branch
}
. You can remove source branch now
=
succeed
'.'
do
The changes were merged into
%span
.label-branch
=
@merge_request
.
target_branch
You can remove the source branch now.
=
link_to
namespace_project_branch_path
(
@merge_request
.
source_project
.
namespace
,
@merge_request
.
source_project
,
@source_branch
),
remote:
true
,
method: :delete
,
class:
"btn btn-primary btn-sm remove_source_branch"
do
=
link_to
namespace_project_branch_path
(
@merge_request
.
source_project
.
namespace
,
@merge_request
.
source_project
,
@source_branch
),
remote:
true
,
method: :delete
,
class:
"btn btn-primary btn-sm remove_source_branch"
do
%i
.fa.fa-times
%i
.fa.fa-times
Remove Source Branch
Remove Source Branch
.remove_source_branch_widget.failed.hide
.remove_source_branch_widget.failed.hide
%p
Failed to remove source branch '
#{
@merge_request
.
source_branch
}
'
Failed to remove source branch '
#{
@merge_request
.
source_branch
}
'.
.remove_source_branch_in_progress.hide
.remove_source_branch_in_progress.hide
%
p
%
i
.fa.fa-spinner.fa-spin
=
icon
(
'spinner spin'
)
Removing source branch '
#{
@merge_request
.
source_branch
}
'. Please wait. This page will be automatically reload.
Removing source branch '
#{
@merge_request
.
source_branch
}
'. Please wait. Page will be automatically reloaded.
:coffeescript
:coffeescript
$('.remove_source_branch').on 'click', ->
$('.remove_source_branch').on 'click', ->
...
...
app/views/projects/merge_requests/widget/_open.html.haml
浏览文件 @
f293d991
...
@@ -22,6 +22,6 @@
...
@@ -22,6 +22,6 @@
.mr-widget-footer
.mr-widget-footer
%span
%span
%i
.fa.fa-check
%i
.fa.fa-check
Accepting this merge request will close
#{
"issue"
.
pluralize
(
@closes_issues
.
size
)
}
Accepting this merge request will close
#{
@closes_issues
.
size
==
1
?
'issue'
:
'issues'
}
=
succeed
'.'
do
=
succeed
'.'
do
!=
gfm
(
issues_sentence
(
@closes_issues
))
!=
gfm
(
issues_sentence
(
@closes_issues
))
app/views/projects/merge_requests/widget/open/_accept.html.haml
浏览文件 @
f293d991
...
@@ -8,10 +8,10 @@
...
@@ -8,10 +8,10 @@
.accept-control.checkbox
.accept-control.checkbox
=
label_tag
:should_remove_source_branch
,
class:
"remove_source_checkbox"
do
=
label_tag
:should_remove_source_branch
,
class:
"remove_source_checkbox"
do
=
check_box_tag
:should_remove_source_branch
=
check_box_tag
:should_remove_source_branch
Remove source
branch
Remove source
-
branch
.accept-control
.accept-control
=
link_to
"#"
,
class:
"modify-merge-commit-link js-toggle-button"
do
=
link_to
"#"
,
class:
"modify-merge-commit-link js-toggle-button"
,
title:
"Modify merge commit message"
do
=
icon
(
'edit'
)
%i
.fa.fa-edit
Modify commit message
Modify commit message
.js-toggle-content.hide.prepend-top-20
.js-toggle-content.hide.prepend-top-20
=
render
'shared/commit_message_container'
,
params:
params
,
=
render
'shared/commit_message_container'
,
params:
params
,
...
...
app/views/projects/merge_requests/widget/open/_archived.html.haml
浏览文件 @
f293d991
%h4
Project is archived
%p
%p
This merge request cannot be merged because archived projects cannot be written to
.
%strong
Archived projects do not provide commit access
.
app/views/projects/merge_requests/widget/open/_check.html.haml
浏览文件 @
f293d991
%strong
%strong
=
icon
(
"spinner spin"
)
%i
.fa.fa-spinner.fa-spin
Checking a
bility to merge automatically
…
Checking a
utomatic merge…
:coffeescript
:coffeescript
$ ->
$ ->
...
...
app/views/projects/merge_requests/widget/open/_conflicts.html.haml
浏览文件 @
f293d991
%h4
%h4
=
icon
(
"exclamation-triangle"
)
This merge request contains merge conflicts that must be resolved.
This merge request contains merge conflicts
%p
-
if
@merge_request
.
can_be_merged_by?
(
current_user
)
Please resolve these conflicts or
%p
-
if
@merge_request
.
can_be_merged_by?
(
current_user
)
You can merge it manually using the
#{
link_to
"merge this request manually"
,
"#modal_merge_info"
,
class:
"how_to_merge_link vlink"
,
"data-toggle"
=>
"modal"
}
.
%strong
-
else
=
link_to
"command line"
,
"#modal_merge_info"
,
class:
"how_to_merge_link vlink"
,
title:
"How To Merge"
,
"data-toggle"
=>
"modal"
ask someone with write access to this repository to merge this request manually.
-
else
%p
Only those with write access to this repository can merge merge requests.
app/views/projects/merge_requests/widget/open/_missing_branch.html.haml
浏览文件 @
f293d991
-
unless
@merge_request
.
source_branch_exists?
%h4
%h4
Can't be merged
=
icon
(
"exclamation-triangle"
)
%p
Sourc
e branch
This merge request can not be accepted becaus
e branch
%span
.label-branch
=
source_branch_with_namespace
(
@merge_request
)
-
unless
@merge_request
.
source_branch_exists?
does not exist
%span
.label.label-inverse
=
@merge_request
.
source_branch
%p
does not exist in
Please restore the source branch or close this merge request and open a new merge request with a different source branch.
%span
.label.label-info
=
@merge_request
.
source_project_path
-
else
%br
%h4
%strong
Please close this merge request and open a new merge request to change source branches.
=
icon
(
"exclamation-triangle"
)
-
else
Target
branch
%span
.label.label-inverse
=
@merge_request
.
target_
branch
%span
.label-branch
=
@merge_request
.
target_branch
does not exist in
does not exist
%span
.label.label-info
=
@merge_request
.
target_project_path
%p
%br
Please restore the target branch or use a different
target branch.
%strong
Please close this merge request or change to another
target branch.
app/views/projects/merge_requests/widget/open/_not_allowed.html.haml
浏览文件 @
f293d991
%h4
%strong
This request can be merged automatically.
Ready to be merged automatically
Only those with write access to this repository can merge merge requests.
%p
Ask someone with write access to this repository to merge this request.
app/views/projects/merge_requests/widget/open/_nothing.html.haml
浏览文件 @
f293d991
%h4
%h4
Nothing to merge
=
icon
(
"exclamation-triangle"
)
Nothing to merge from
%span
.label-branch
=
source_branch_with_namespace
(
@merge_request
)
into
%span
.label-branch
=
@merge_request
.
target_branch
%p
%p
Please push new commits to the source branch or use a different target branch.
Nothing to merge from
%span
.label-branch
#{
@merge_request
.
source_branch
}
to
%span
.label-branch
#{
@merge_request
.
target_branch
}
%br
Try to use different branches or push new code.
app/views/projects/merge_requests/widget/open/_reload.html.haml
浏览文件 @
f293d991
%h4
This merge request cannot be merged. Try to reload the page.
=
icon
(
"exclamation-triangle"
)
This merge request failed to be merged automatically
%p
Please reload the page to find out the reason.
app/views/projects/merge_requests/widget/open/_wip.html.haml
浏览文件 @
f293d991
%h4
-
if
@merge_request
.
can_be_merged_by?
(
current_user
)
This merge request is currently a Work In Progress
%h4
This merge request cannot be accepted because it is marked as Work In Progress.
%p
%p
When this merge request is ready, remove the "WIP" prefix from the title to allow it to be merged.
%button
.btn.disabled
{
:type
=>
'button'
}
%i
.fa.fa-warning
Accept Merge Request
When the merge request is ready, remove the "WIP" prefix from the title to allow it to be accepted.
-
else
%strong
This merge request is marked as Work In Progress.
Only those with write access to this repository can merge merge requests.
app/views/shared/issuable/_form.html.haml
浏览文件 @
f293d991
...
@@ -16,10 +16,10 @@
...
@@ -16,10 +16,10 @@
%p
.help-block
%p
.help-block
-
if
issuable
.
work_in_progress?
-
if
issuable
.
work_in_progress?
Remove the
<code>
WIP
</code>
prefix from the title to allow this
Remove the
<code>
WIP
</code>
prefix from the title to allow this
<strong>
Work In Progress
</strong>
merge request to be
merg
ed when it's ready.
<strong>
Work In Progress
</strong>
merge request to be
accept
ed when it's ready.
-
else
-
else
Start the title with
<code>
[WIP]
</code>
or
<code>
WIP:
</code>
to prevent a
Start the title with
<code>
[WIP]
</code>
or
<code>
WIP:
</code>
to prevent a
<strong>
Work In Progress
</strong>
merge request from being
merg
ed before it's ready.
<strong>
Work In Progress
</strong>
merge request from being
accept
ed before it's ready.
.form-group.issuable-description
.form-group.issuable-description
=
f
.
label
:description
,
'Description'
,
class:
'control-label'
=
f
.
label
:description
,
'Description'
,
class:
'control-label'
.col-sm-10
.col-sm-10
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录