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
9f9cac67
Commit
9f9cac67
authored
Oct 05, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CE to EE merge (backport)
parent
393331b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
app/services/merge_requests/refresh_service.rb
app/services/merge_requests/refresh_service.rb
+6
-5
lib/gitlab/git/push.rb
lib/gitlab/git/push.rb
+1
-1
No files found.
app/services/merge_requests/refresh_service.rb
View file @
9f9cac67
...
@@ -3,16 +3,17 @@
...
@@ -3,16 +3,17 @@
module
MergeRequests
module
MergeRequests
class
RefreshService
<
MergeRequests
::
BaseService
class
RefreshService
<
MergeRequests
::
BaseService
def
execute
(
oldrev
,
newrev
,
ref
)
def
execute
(
oldrev
,
newrev
,
ref
)
@push
=
Gitlab
::
Git
::
Push
.
new
(
@project
,
oldrev
,
newrev
,
ref
)
push
=
Gitlab
::
Git
::
Push
.
new
(
@project
,
oldrev
,
newrev
,
ref
)
return
true
unless
push
.
branch_push?
return
true
unless
@push
.
branch_push?
refresh_merge_requests!
(
push
)
refresh_merge_requests!
end
end
private
private
def
refresh_merge_requests!
def
refresh_merge_requests!
(
push
)
@push
=
push
Gitlab
::
GitalyClient
.
allow_n_plus_1_calls
(
&
method
(
:find_new_commits
))
Gitlab
::
GitalyClient
.
allow_n_plus_1_calls
(
&
method
(
:find_new_commits
))
# Be sure to close outstanding MRs before reloading them to avoid generating an
# Be sure to close outstanding MRs before reloading them to avoid generating an
# empty diff during a manual merge
# empty diff during a manual merge
...
...
lib/gitlab/git/push.rb
View file @
9f9cac67
...
@@ -5,7 +5,7 @@ module Gitlab
...
@@ -5,7 +5,7 @@ module Gitlab
class
Push
class
Push
include
Gitlab
::
Utils
::
StrongMemoize
include
Gitlab
::
Utils
::
StrongMemoize
attr_reader
:oldrev
,
:newrev
attr_reader
:
ref
,
:
oldrev
,
:newrev
def
initialize
(
project
,
oldrev
,
newrev
,
ref
)
def
initialize
(
project
,
oldrev
,
newrev
,
ref
)
@project
=
project
@project
=
project
...
...
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