Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
minad committed Oct 12, 2012
1 parent 80917bc commit 3937e3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Olelo::Config.instance.load(ENV['OLELO_CONFIG'] || ENV['WIKI_CONFIG'] || ::File.
Olelo::Config.instance.freeze

FileUtils.mkpath ::File.dirname(Olelo::Config['log.file'])
logger = ::Logger.new(Olelo::Config['log.file'], 25, 1024000)
logger = ::Logger.new(Olelo::Config['log.file'], :monthly, 1024000)
logger.level = ::Logger.const_get(Olelo::Config['log.level'])

use_lint if !Olelo::Config['production']
Expand Down
6 changes: 3 additions & 3 deletions plugins/repositories/rugged/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Transaction
def initialize(git)
@git = git
@head = @git.head.target
@tree = Tree.new(@git, @head.tree)
@tree = Tree.new(@git, @git.lookup(@head).tree_oid)
end
end

Expand Down Expand Up @@ -195,7 +195,7 @@ def delete(path)

def commit(comment)
user = User.current
raise 'Concurrent transactions' current_transaction.head != @git.head.target
raise 'Concurrent transactions' if current_transaction.head != @git.head.target

author = {:email => user.email, :name => user.name, :time => Time.now }
commit = Rugged::Commit.create(@git,
Expand All @@ -205,7 +205,7 @@ def commit(comment)
:parents => [current_transaction.head],
:tree => current_tree.save)

raise 'Concurrent transactions' current_transaction.head != @git.head.target
raise 'Concurrent transactions' if current_transaction.head != @git.head.target
@git.head.target = commit

commit_to_version(@git.lookup(commit))
Expand Down
2 changes: 1 addition & 1 deletion plugins/utils/pygments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def self.setup
$1.split(', ').each {|s| @patterns[s] = format.first }
end
end
rescue Exception => ex
rescue Errno::ENOENT => ex
Olelo.logger.warn 'pygmentize not found'
end
end
Expand Down

0 comments on commit 3937e3b

Please sign in to comment.