diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-13 06:10:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-13 06:10:36 +0300 |
commit | 44696847f6f67ecd065d273f971a3aeec3187673 (patch) | |
tree | 49433d6be6593bf7bcaa81dd5a48534608bb4471 /app/services/projects | |
parent | dce8d0c6a7fdc7cca4df3b00b11d68000d117e2f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/projects')
-rw-r--r-- | app/services/projects/transfer_service.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/app/services/projects/transfer_service.rb b/app/services/projects/transfer_service.rb index 3d08039942b..30d9e1922cc 100644 --- a/app/services/projects/transfer_service.rb +++ b/app/services/projects/transfer_service.rb @@ -124,9 +124,6 @@ module Projects # Notifications project.send_move_instructions(@old_path) - # Directories on disk - move_project_folders(project) - transfer_missing_group_resources(@old_group) # Move uploads @@ -235,44 +232,15 @@ module Projects end def rollback_side_effects - rollback_folder_move project.reset update_namespace_and_visibility(@old_namespace) update_repository_configuration(@old_path) end - def rollback_folder_move - return if project.hashed_storage?(:repository) - - move_repo_folder(@new_path, @old_path) - move_repo_folder(new_wiki_repo_path, old_wiki_repo_path) - move_repo_folder(new_design_repo_path, old_design_repo_path) - end - - def move_repo_folder(from_name, to_name) - gitlab_shell.mv_repository(project.repository_storage, from_name, to_name) - end - def execute_system_hooks system_hook_service.execute_hooks_for(project, :transfer) end - def move_project_folders(project) - return if project.hashed_storage?(:repository) - - # Move main repository - unless move_repo_folder(@old_path, @new_path) - raise TransferError, s_("TransferProject|Cannot move project") - end - - # Disk path is changed; we need to ensure we reload it - project.reload_repository! - - # Move wiki and design repos also if present - move_repo_folder(old_wiki_repo_path, new_wiki_repo_path) - move_repo_folder(old_design_repo_path, new_design_repo_path) - end - def move_project_uploads(project) return if project.hashed_storage?(:attachments) |