Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-12-01 00:34:31 +0300
committerNick Thomas <nick@gitlab.com>2017-12-04 12:42:14 +0300
commit327a9898a226a098b18e80e4950702064ecd38f1 (patch)
treee6b48be28658d8052e7a5121f7893648b83a2843 /app/workers/repository_fork_worker.rb
parente0f84130567dc34edf1ae75fcf595e24991d2fa9 (diff)
Fix the fork project functionality for projects with hashed storage
Note the dependency on gitlab-shell v5.10.0
Diffstat (limited to 'app/workers/repository_fork_worker.rb')
-rw-r--r--app/workers/repository_fork_worker.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/workers/repository_fork_worker.rb b/app/workers/repository_fork_worker.rb
index 264706e3e23..001c11b73e1 100644
--- a/app/workers/repository_fork_worker.rb
+++ b/app/workers/repository_fork_worker.rb
@@ -8,18 +8,18 @@ class RepositoryForkWorker
sidekiq_options status_expiration: StuckImportJobsWorker::IMPORT_JOBS_EXPIRATION
- def perform(project_id, forked_from_repository_storage_path, source_path, target_path)
+ def perform(project_id, forked_from_repository_storage_path, source_disk_path)
project = Project.find(project_id)
return unless start_fork(project)
Gitlab::Metrics.add_event(:fork_repository,
- source_path: source_path,
- target_path: target_path)
+ source_path: source_disk_path,
+ target_path: project.disk_path)
- result = gitlab_shell.fork_repository(forked_from_repository_storage_path, source_path,
- project.repository_storage_path, target_path)
- raise ForkError, "Unable to fork project #{project_id} for repository #{source_path} -> #{target_path}" unless result
+ result = gitlab_shell.fork_repository(forked_from_repository_storage_path, source_disk_path,
+ project.repository_storage_path, project.disk_path)
+ raise ForkError, "Unable to fork project #{project_id} for repository #{source_disk_path} -> #{project.disk_path}" unless result
project.repository.after_import
raise ForkError, "Project #{project_id} had an invalid repository after fork" unless project.valid_repo?