summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-05-10 17:22:28 +0200
committerJames Lopez <james@jameslopez.es>2016-05-10 17:22:28 +0200
commitdf6483c65fe9c58e237fe0fcd9d71890ef7233fc (patch)
tree4b9047332aeb8b56e13b33b9c9a4809ad9b46bf4 /app
parent17ce63a5e19f03fb1fec04724ca6d41e463a32b6 (diff)
parent6fa529e98124c592cc0a886c57efc8456d3c601c (diff)
downloadgitlab-ce-df6483c65fe9c58e237fe0fcd9d71890ef7233fc.tar.gz
Merge branches 'feature/project-export-ui-experimental' and 'feature/project-import' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export-ui-experimental
Diffstat (limited to 'app')
-rw-r--r--app/services/projects/import_export/export_service.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/services/projects/import_export/export_service.rb b/app/services/projects/import_export/export_service.rb
index fd569e1c9ae..87a259ed15a 100644
--- a/app/services/projects/import_export/export_service.rb
+++ b/app/services/projects/import_export/export_service.rb
@@ -4,8 +4,8 @@ module Projects
def execute(options = {})
@shared = Gitlab::ImportExport::Shared.new(relative_path: File.join(project.path_with_namespace, 'work'))
- # TODO handle errors
save_all if [save_project_tree, bundle_repo, bundle_wiki_repo].all?
+ notify_worker if @shared.errors.any?
end
private
@@ -23,7 +23,11 @@ module Projects
end
def save_all
- Gitlab::ImportExport::Saver.save(storage_path: @shared.export_path)
+ Gitlab::ImportExport::Saver.save(shared: @shared)
+ end
+
+ def notify_worker
+ raise Gitlab::ImportExport::Error @shared.errors.join(', ')
end
end
end