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
33205b08
Commit
33205b08
authored
Mar 07, 2019
by
Luke Duncalfe
Committed by
Luke Duncalfe
Mar 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'sh-show-pre-receive-error-merge' into 'master'"
This reverts merge request !25708
parent
1de36fd2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
app/services/merge_requests/merge_service.rb
app/services/merge_requests/merge_service.rb
+2
-1
changelogs/unreleased/sh-show-pre-receive-error-merge.yml
changelogs/unreleased/sh-show-pre-receive-error-merge.yml
+0
-5
spec/services/merge_requests/merge_service_spec.rb
spec/services/merge_requests/merge_service_spec.rb
+1
-1
No files found.
app/services/merge_requests/merge_service.rb
View file @
33205b08
...
...
@@ -76,7 +76,8 @@ module MergeRequests
def
try_merge
repository
.
merge
(
current_user
,
source
,
merge_request
,
commit_message
)
rescue
Gitlab
::
Git
::
PreReceiveError
=>
e
raise_error
(
"Something went wrong during merge pre-receive hook:
#{
e
.
message
}
"
)
handle_merge_error
(
log_message:
e
.
message
)
raise_error
(
'Something went wrong during merge pre-receive hook'
)
rescue
=>
e
handle_merge_error
(
log_message:
e
.
message
)
raise_error
(
'Something went wrong during merge'
)
...
...
changelogs/unreleased/sh-show-pre-receive-error-merge.yml
deleted
100644 → 0
View file @
1de36fd2
---
title
:
Show pre-receive error message when merge fails
merge_request
:
25708
author
:
type
:
fixed
spec/services/merge_requests/merge_service_spec.rb
View file @
33205b08
...
...
@@ -244,7 +244,7 @@ describe MergeRequests::MergeService do
service
.
execute
(
merge_request
)
expect
(
merge_request
.
merge_error
).
to
include
(
"Something went wrong during merge pre-receive hook:
#{
error_message
}
"
)
expect
(
merge_request
.
merge_error
).
to
include
(
'Something went wrong during merge pre-receive hook'
)
expect
(
Rails
.
logger
).
to
have_received
(
:error
).
with
(
a_string_matching
(
error_message
))
end
...
...
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