Commit 5a5845e4 authored by gitlabhq's avatar gitlabhq

few fixes

parent 2daa6161
...@@ -29,7 +29,7 @@ class Project < ActiveRecord::Base ...@@ -29,7 +29,7 @@ class Project < ActiveRecord::Base
:uniqueness => true, :uniqueness => true,
:format => { :with => /^[a-zA-Z0-9_\-]*$/, :format => { :with => /^[a-zA-Z0-9_\-]*$/,
:message => "only letters, digits & '_' '-' allowed" }, :message => "only letters, digits & '_' '-' allowed" },
:length => { :within => 3..16 } :length => { :within => 3..255 }
validates :owner, validates :owner,
:presence => true :presence => true
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
%td %td
.left= f.label :code .left= f.label :code
%cite.right http://yourserver/ %cite.right http://yourserver/
%td= f.text_field :code, :placeholder => "example (3..12 symbols only)" %td= f.text_field :code, :placeholder => "example"
.field .field
= f.label :description = f.label :description
%br/ %br/
......
...@@ -27,15 +27,16 @@ class Gitosis ...@@ -27,15 +27,16 @@ class Gitosis
def configure def configure
status = Timeout::timeout(20) 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|
begin
f.flock(File::LOCK_EX) f.flock(File::LOCK_EX)
pull pull
yield(self) yield(self)
push push
ensure
f.flock(File::LOCK_UN) f.flock(File::LOCK_UN)
end end
end end
end
rescue Exception => ex rescue Exception => ex
raise Gitosis::AccessDenied.new("gitosis timeout") raise Gitosis::AccessDenied.new("gitosis timeout")
end end
......
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