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
30801273
Commit
30801273
authored
Oct 26, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix timeouts in MergeAction
parent
0ebcc60a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/satellite/merge_action.rb
lib/gitlab/satellite/merge_action.rb
+4
-4
No files found.
lib/gitlab/satellite/merge_action.rb
View file @
30801273
...
...
@@ -26,12 +26,12 @@ module Gitlab
if
merge_in_satellite!
(
merge_repo
)
# push merge back to Gitolite
# will raise CommandFailed when push fails
merge_repo
.
git
.
push
({
raise:
true
},
:origin
,
merge_request
.
target_branch
)
merge_repo
.
git
.
push
({
raise:
true
,
timeout:
true
},
:origin
,
merge_request
.
target_branch
)
# remove source branch
if
merge_request
.
should_remove_source_branch
&&
!
project
.
root_ref?
(
merge_request
.
source_branch
)
# will raise CommandFailed when push fails
merge_repo
.
git
.
push
({
raise:
true
},
:origin
,
":
#{
merge_request
.
source_branch
}
"
)
merge_repo
.
git
.
push
({
raise:
true
,
timeout:
true
},
:origin
,
":
#{
merge_request
.
source_branch
}
"
)
end
# merge, push and branch removal successful
...
...
@@ -55,11 +55,11 @@ module Gitlab
prepare_satellite!
(
repo
)
# create target branch in satellite at the corresponding commit from Gitolite
repo
.
git
.
checkout
({
raise:
true
,
b:
true
},
merge_request
.
target_branch
,
"origin/
#{
merge_request
.
target_branch
}
"
)
repo
.
git
.
checkout
({
raise:
true
,
timeout:
true
,
b:
true
},
merge_request
.
target_branch
,
"origin/
#{
merge_request
.
target_branch
}
"
)
# merge the source branch from Gitolite into the satellite
# will raise CommandFailed when merge fails
repo
.
git
.
pull
({
raise:
true
,
no_ff:
true
},
:origin
,
merge_request
.
source_branch
)
repo
.
git
.
pull
({
raise:
true
,
timeout:
true
,
no_ff:
true
},
:origin
,
merge_request
.
source_branch
)
rescue
Grit
::
Git
::
CommandFailed
=>
ex
Gitlab
::
GitLogger
.
error
(
ex
.
message
)
false
...
...
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