Commit 41f9d9d9 authored by James Lopez's avatar James Lopez

Merge branch 'feature/project-export' of gitlab.com:gitlab-org/gitlab-ce into...

Merge branch 'feature/project-export' of gitlab.com:gitlab-org/gitlab-ce into feature/project-import
parents 2e1decd0 2dff04f2
...@@ -9,5 +9,13 @@ module Gitlab ...@@ -9,5 +9,13 @@ module Gitlab
def storage_path def storage_path
File.join(Settings.shared['path'], 'tmp/project_exports') File.join(Settings.shared['path'], 'tmp/project_exports')
end end
def project_filename
"project.json"
end
def project_bundle_filename
"project.bundle"
end
end end
end end
...@@ -6,7 +6,7 @@ module Gitlab ...@@ -6,7 +6,7 @@ module Gitlab
def initialize(project:, shared:) def initialize(project:, shared:)
@project = project @project = project
@shared = shared @shared = shared
@full_path = File.join(@shared.export_path, project_filename) @full_path = File.join(@shared.export_path, ImportExport.project_filename)
end end
def save def save
...@@ -20,11 +20,6 @@ module Gitlab ...@@ -20,11 +20,6 @@ module Gitlab
private private
# TODO remove magic keyword and move it to a shared config
def project_filename
"project.json"
end
def project_json_tree def project_json_tree
@project.to_json(Gitlab::ImportExport::ImportExportReader.new(shared: @shared).project_tree) @project.to_json(Gitlab::ImportExport::ImportExportReader.new(shared: @shared).project_tree)
end end
......
...@@ -12,7 +12,7 @@ module Gitlab ...@@ -12,7 +12,7 @@ module Gitlab
def bundle def bundle
return false if @project.empty_repo? return false if @project.empty_repo?
@full_path = File.join(@shared.export_path, project_filename) @full_path = File.join(@shared.export_path, ImportExport.project_bundle_filename)
bundle_to_disk bundle_to_disk
end end
...@@ -26,11 +26,6 @@ module Gitlab ...@@ -26,11 +26,6 @@ module Gitlab
false false
end end
# TODO remove magic keyword and move it to a shared config
def project_filename
"project.bundle"
end
def path_to_repo def path_to_repo
@project.repository.path_to_repo @project.repository.path_to_repo
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment