diff options
author | Nick Thomas <nick@gitlab.com> | 2017-11-30 21:34:31 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-12-04 09:42:14 +0000 |
commit | 327a9898a226a098b18e80e4950702064ecd38f1 (patch) | |
tree | e6b48be28658d8052e7a5121f7893648b83a2843 /app/workers | |
parent | e0f84130567dc34edf1ae75fcf595e24991d2fa9 (diff) | |
download | gitlab-ce-327a9898a226a098b18e80e4950702064ecd38f1.tar.gz |
Fix the fork project functionality for projects with hashed storage
Note the dependency on gitlab-shell v5.10.0
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/repository_fork_worker.rb | 12 |
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? |