fix gitosis log error
This commit is contained in:
parent
eefe826f83
commit
29149848d4
1 changed files with 9 additions and 7 deletions
|
@ -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
|
||||||
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'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue