Commit 29149848 authored by gitlabhq's avatar gitlabhq

fix gitosis log error

parent eefe826f
...@@ -11,19 +11,21 @@ class Gitosis ...@@ -11,19 +11,21 @@ class Gitosis
Dir.mkdir @local_dir Dir.mkdir @local_dir
@repo = Git.clone(GITOSIS['admin_uri'], "#{@local_dir}/gitosis") `git clone #{GITOSIS['admin_uri']} #{@local_dir}/gitosis`
end end
def push def push
@repo.add('.') Dir.chdir(File.join(@local_dir, "gitosis"))
@repo.commit_all "Gitlab" `git add -A`
@repo.push `git commit -am "Gitlab"`
`git push`
Dir.chdir(Rails.root)
#FileUtils.rm_rf(@local_dir) FileUtils.rm_rf(@local_dir)
end end
def configure def configure
status = Timeout::timeout(5) do status = Timeout::timeout(20) do
File.open(File.join(Dir.tmpdir,"gitlabhq-gitosis.lock"), "w+") do |f| File.open(File.join(Dir.tmpdir,"gitlabhq-gitosis.lock"), "w+") do |f|
f.flock(File::LOCK_EX) f.flock(File::LOCK_EX)
...@@ -39,7 +41,7 @@ class Gitosis ...@@ -39,7 +41,7 @@ class Gitosis
end end
def destroy_project(project) def destroy_project(project)
#FileUtils.rm_rf(project.path_to_repo) FileUtils.rm_rf(project.path_to_repo)
conf = IniFile.new(File.join(@local_dir,'gitosis','gitosis.conf')) conf = IniFile.new(File.join(@local_dir,'gitosis','gitosis.conf'))
......
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