Commit 3ffb9cbf authored by Zevs's avatar Zevs

Task#879 Relocated gitolite repo and lock file

parent a0db028c
...@@ -16,7 +16,7 @@ module Gitlab ...@@ -16,7 +16,7 @@ module Gitlab
def pull def pull
# create tmp dir # create tmp dir
@local_dir = File.join(Dir.tmpdir,"gitlabhq-gitolite-#{Time.now.to_i}") @local_dir = File.join(Rails.root, 'tmp',"gitlabhq-gitolite-#{Time.now.to_i}")
Dir.mkdir @local_dir Dir.mkdir @local_dir
`git clone #{GitHost.admin_uri} #{@local_dir}/gitolite` `git clone #{GitHost.admin_uri} #{@local_dir}/gitolite`
...@@ -33,8 +33,8 @@ module Gitlab ...@@ -33,8 +33,8 @@ module Gitlab
end end
def configure def configure
status = Timeout::timeout(20) do Timeout::timeout(20) do
File.open(File.join(Dir.tmpdir,"gitlabhq-gitolite.lock"), "w+") do |f| File.open(File.join(Rails.root, 'tmp', "gitlabhq-gitolite.lock"), "w+") do |f|
begin begin
f.flock(File::LOCK_EX) f.flock(File::LOCK_EX)
pull pull
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment