Commit 88033500232f12234a9546aa9b89111bcdbfecef

Authored by Dmitriy Zaporozhets
1 parent 494cd02b

CHANGELOG updated. Fixed MR bug. Logger improved

1 v 2.7.0 1 v 2.7.0
2 - Issue Labels 2 - Issue Labels
  3 + - Inline diff
  4 + - Git HTTP
  5 + - API
  6 + - UI improved
3 7
4 v 2.6.0 8 v 2.6.0
5 - UI polished 9 - UI polished
app/assets/stylesheets/gitlab_bootstrap.scss
@@ -317,6 +317,10 @@ table.no-borders { @@ -317,6 +317,10 @@ table.no-borders {
317 &.closed { 317 &.closed {
318 background-color: #B94A48; 318 background-color: #B94A48;
319 } 319 }
  320 +
  321 + &.merged {
  322 + background-color: #2A2;
  323 + }
320 } 324 }
321 325
322 img.avatar { 326 img.avatar {
app/models/merge_request.rb
@@ -128,7 +128,7 @@ class MergeRequest < ActiveRecord::Base @@ -128,7 +128,7 @@ class MergeRequest < ActiveRecord::Base
128 128
129 def unmerged_diffs 129 def unmerged_diffs
130 commits = project.repo.commits_between(target_branch, source_branch).map {|c| Commit.new(c)} 130 commits = project.repo.commits_between(target_branch, source_branch).map {|c| Commit.new(c)}
131 - diffs = project.repo.diff(commits.first.prev_commit.id, commits.last.id) 131 + diffs = project.repo.diff(commits.first.prev_commit.id, commits.last.id) rescue []
132 end 132 end
133 133
134 def last_commit 134 def last_commit
lib/gitlab/logger.rb
1 module Gitlab 1 module Gitlab
2 - class Logger 2 + class Logger < ::Logger
3 def self.error(message) 3 def self.error(message)
4 - @@logger ||= ::Logger.new(File.join(Rails.root, "log/githost.log"))  
5 - message = Time.now.to_s(:long) + " -> " + message  
6 - @@logger.error(message) 4 + build.error(message)
  5 + end
  6 +
  7 + def self.info(message)
  8 + build.info(message)
7 end 9 end
8 10
9 def self.read_latest 11 def self.read_latest
10 path = Rails.root.join("log/githost.log") 12 path = Rails.root.join("log/githost.log")
11 logs = File.read(path).split("\n") 13 logs = File.read(path).split("\n")
12 end 14 end
  15 +
  16 + def self.build
  17 + new(File.join(Rails.root, "log/githost.log"))
  18 + end
  19 +
  20 + def format_message(severity, timestamp, progname, msg)
  21 + "#{timestamp.to_s(:long)} -> #{severity} -> #{msg}\n"
  22 + end
13 end 23 end
14 end 24 end