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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
21f3da23
Commit
21f3da23
authored
Apr 23, 2012
by
Ariejan de Vroom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure tmp/merge_repo is available to write lock files for auto-merge.
parent
204c6646
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lib/gitlab_merge.rb
lib/gitlab_merge.rb
+6
-2
No files found.
lib/gitlab_merge.rb
View file @
21f3da23
...
@@ -25,8 +25,12 @@ class GitlabMerge
...
@@ -25,8 +25,12 @@ class GitlabMerge
end
end
def
process
def
process
Grit
::
Git
.
with_timeout
(
30
.
seconds
)
do
Grit
::
Git
.
with_timeout
(
30
.
seconds
)
do
File
.
open
(
File
.
join
(
Rails
.
root
,
"tmp"
,
"merge_repo"
,
"
#{
project
.
path
}
.lock"
),
"w+"
)
do
|
f
|
# Make sure tmp/merge_repo exists
lock_path
=
File
.
join
(
Rails
.
root
,
"tmp"
,
"merge_repo"
)
FileUtils
.
mkdir_p
(
lock_path
)
unless
File
.
exists?
(
File
.
join
(
Rails
.
root
,
"tmp"
,
"merge_repo"
))
File
.
open
(
File
.
join
(
lock_path
,
"
#{
project
.
path
}
.lock"
),
"w+"
)
do
|
f
|
f
.
flock
(
File
::
LOCK_EX
)
f
.
flock
(
File
::
LOCK_EX
)
unless
project
.
satellite
.
exists?
unless
project
.
satellite
.
exists?
...
...
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