diff options
author | James Lopez <james@jameslopez.es> | 2016-05-11 17:22:45 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-05-11 17:22:45 +0200 |
commit | a61456e44e8f26067187643a3f1b74b484428bad (patch) | |
tree | 029ba99959b31b1a6a861ff1ac7462b625d4f85f /lib/gitlab/import_export/repo_restorer.rb | |
parent | 27867f35429ad6d3ca232db159e7a98e400b1d41 (diff) | |
download | gitlab-ce-a61456e44e8f26067187643a3f1b74b484428bad.tar.gz |
refactored import to use shared error stuff and fixed a few issues with recent refactorings
Diffstat (limited to 'lib/gitlab/import_export/repo_restorer.rb')
-rw-r--r-- | lib/gitlab/import_export/repo_restorer.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/import_export/repo_restorer.rb b/lib/gitlab/import_export/repo_restorer.rb index 7a4cda828b4..3909d447448 100644 --- a/lib/gitlab/import_export/repo_restorer.rb +++ b/lib/gitlab/import_export/repo_restorer.rb @@ -3,9 +3,10 @@ module Gitlab class RepoRestorer include Gitlab::ImportExport::CommandLineUtil - def initialize(project:, path_to_bundle:) + def initialize(project:, shared:, path_to_bundle:) @project = project @path_to_bundle = path_to_bundle + @shared = shared end def restore @@ -15,7 +16,8 @@ module Gitlab FileUtils.mkdir_p(path_to_repo) git_unbundle(repo_path: path_to_repo, bundle_path: @path_to_bundle) - rescue + rescue => e + @shared.error(e.message) false end |