WebEditor: base implementation

This commit is contained in:
Valeriy Sizov 2012-10-12 17:14:52 +03:00
parent 0b3e9fd218
commit 42bdfd021b
4 changed files with 55 additions and 10 deletions

View file

@ -28,13 +28,13 @@ module Gitlab
def process
Grit::Git.with_timeout(30.seconds) do
lock_file = Rails.root.join("tmp", "merge_repo_#{project.path}.lock")
lock_file = Rails.root.join("tmp", "#{project.path}.lock")
File.open(lock_file, "w+") do |f|
f.flock(File::LOCK_EX)
unless project.satellite.exists?
raise "You should run: rake gitlab:app:enable_automerge"
raise "Satellite doesn't exist"
end
project.satellite.clear