Commit 88033500 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

CHANGELOG updated. Fixed MR bug. Logger improved

parent 494cd02b
v 2.7.0
- Issue Labels
- Inline diff
- Git HTTP
- API
- UI improved
v 2.6.0
- UI polished
......
......@@ -317,6 +317,10 @@ table.no-borders {
&.closed {
background-color: #B94A48;
}
&.merged {
background-color: #2A2;
}
}
img.avatar {
......
......@@ -128,7 +128,7 @@ class MergeRequest < ActiveRecord::Base
def unmerged_diffs
commits = project.repo.commits_between(target_branch, source_branch).map {|c| Commit.new(c)}
diffs = project.repo.diff(commits.first.prev_commit.id, commits.last.id)
diffs = project.repo.diff(commits.first.prev_commit.id, commits.last.id) rescue []
end
def last_commit
......
module Gitlab
class Logger
class Logger < ::Logger
def self.error(message)
@@logger ||= ::Logger.new(File.join(Rails.root, "log/githost.log"))
message = Time.now.to_s(:long) + " -> " + message
@@logger.error(message)
build.error(message)
end
def self.info(message)
build.info(message)
end
def self.read_latest
path = Rails.root.join("log/githost.log")
logs = File.read(path).split("\n")
end
def self.build
new(File.join(Rails.root, "log/githost.log"))
end
def format_message(severity, timestamp, progname, msg)
"#{timestamp.to_s(:long)} -> #{severity} -> #{msg}\n"
end
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