Commit 5a5845e4908895ecb8ad60bfc964eaeecdcc43b2

Authored by gitlabhq
1 parent 2daa6161

few fixes

app/models/project.rb
... ... @@ -29,7 +29,7 @@ class Project < ActiveRecord::Base
29 29 :uniqueness => true,
30 30 :format => { :with => /^[a-zA-Z0-9_\-]*$/,
31 31 :message => "only letters, digits & '_' '-' allowed" },
32   - :length => { :within => 3..16 }
  32 + :length => { :within => 3..255 }
33 33  
34 34 validates :owner,
35 35 :presence => true
... ...
app/views/projects/_form.html.haml
... ... @@ -24,7 +24,7 @@
24 24 %td
25 25 .left= f.label :code
26 26 %cite.right http://yourserver/
27   - %td= f.text_field :code, :placeholder => "example (3..12 symbols only)"
  27 + %td= f.text_field :code, :placeholder => "example"
28 28 .field
29 29 = f.label :description
30 30 %br/
... ...
lib/gitosis.rb
... ... @@ -27,13 +27,14 @@ class Gitosis
27 27 def configure
28 28 status = Timeout::timeout(20) do
29 29 File.open(File.join(Dir.tmpdir,"gitlabhq-gitosis.lock"), "w+") do |f|
30   - f.flock(File::LOCK_EX)
31   -
32   - pull
33   - yield(self)
34   - push
35   -
36   - f.flock(File::LOCK_UN)
  30 + begin
  31 + f.flock(File::LOCK_EX)
  32 + pull
  33 + yield(self)
  34 + push
  35 + ensure
  36 + f.flock(File::LOCK_UN)
  37 + end
37 38 end
38 39 end
39 40 rescue Exception => ex
... ...