Commit 5a5845e4908895ecb8ad60bfc964eaeecdcc43b2
1 parent
2daa6161
Exists in
master
and in
4 other branches
few fixes
Showing
3 changed files
with
10 additions
and
9 deletions
Show diff stats
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
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 | ... | ... |