diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-07 08:56:05 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-07-10 15:31:50 -0500 |
commit | 46e8efc2fbc43e60c5cdf034a5ae8116bad4fb19 (patch) | |
tree | 1ce23285192577fb009af3eeed716dc83dd0349d | |
parent | f17ae70554e7cb1f190439e55f95a4640875b35a (diff) | |
download | gitlab-ce-46e8efc2fbc43e60c5cdf034a5ae8116bad4fb19.tar.gz |
Merge branch 'fix/import-export-log' into 'master'
Fix log statements in import/export
Fixes - as seen in the logs:
```
Import/Export error raised on /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/import_export/file_importer.rb:19:in `rescue in import': undefined method `message' for #<String:0x007fc45e977e10>
```
See merge request !5129
(cherry picked from commit 3c89a788c795fba2b050a0af0d8261e302d8cded)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | lib/gitlab/import_export/command_line_util.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/import_export/saver.rb | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG index fb6f0d76dbb..89b9e1566f7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.9.6 + - Fix log statements in import/export. !5129 - Fix broken migration in MySQL. !5005 v 8.9.5 diff --git a/lib/gitlab/import_export/command_line_util.rb b/lib/gitlab/import_export/command_line_util.rb index 62c736451b7..2249904145c 100644 --- a/lib/gitlab/import_export/command_line_util.rb +++ b/lib/gitlab/import_export/command_line_util.rb @@ -29,7 +29,7 @@ module Gitlab def execute(cmd) output, status = Gitlab::Popen.popen(cmd) - @shared.error(output.to_s) unless status.zero? + @shared.error(Gitlab::ImportExport::Error.new(output.to_s)) unless status.zero? status.zero? end diff --git a/lib/gitlab/import_export/saver.rb b/lib/gitlab/import_export/saver.rb index dd4fdf37309..6a60b65071f 100644 --- a/lib/gitlab/import_export/saver.rb +++ b/lib/gitlab/import_export/saver.rb @@ -17,7 +17,7 @@ module Gitlab Rails.logger.info("Saved project export #{archive_file}") archive_file else - @shared.error("Unable to save #{archive_file} into #{@shared.export_path}") + @shared.error(Gitlab::ImportExport::Error.new("Unable to save #{archive_file} into #{@shared.export_path}")) false end rescue => e |