diff options
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/gitlab_bootstrap.scss | 4 | ||||
-rw-r--r-- | app/models/merge_request.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/logger.rb | 18 |
4 files changed, 23 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG index 172357603cb..fe243d65e4b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ v 2.7.0 - Issue Labels + - Inline diff + - Git HTTP + - API + - UI improved v 2.6.0 - UI polished diff --git a/app/assets/stylesheets/gitlab_bootstrap.scss b/app/assets/stylesheets/gitlab_bootstrap.scss index 9feb2b818c9..c0a20762d0a 100644 --- a/app/assets/stylesheets/gitlab_bootstrap.scss +++ b/app/assets/stylesheets/gitlab_bootstrap.scss @@ -317,6 +317,10 @@ table.no-borders { &.closed { background-color: #B94A48; } + + &.merged { + background-color: #2A2; + } } img.avatar { diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 27b8e07dc9a..2581f3be4c9 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -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 diff --git a/lib/gitlab/logger.rb b/lib/gitlab/logger.rb index 5249fdbca0e..aff13baf67b 100644 --- a/lib/gitlab/logger.rb +++ b/lib/gitlab/logger.rb @@ -1,14 +1,24 @@ 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 |