diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-09 06:10:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-09 06:10:21 +0300 |
commit | 11c6346b54ac6418e4ead496bcc632cf88065a74 (patch) | |
tree | fbbe99854cb2b4fa81561e1de11b628b9f6c350b /app/models | |
parent | 6b27ba3f6b9d876f3460019333aa93de5587b65a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/storage/hashed.rb | 4 | ||||
-rw-r--r-- | app/models/storage/legacy_project.rb | 22 |
2 files changed, 0 insertions, 26 deletions
diff --git a/app/models/storage/hashed.rb b/app/models/storage/hashed.rb index 05e93f00912..5cef033e672 100644 --- a/app/models/storage/hashed.rb +++ b/app/models/storage/hashed.rb @@ -31,10 +31,6 @@ module Storage "#{base_dir}/#{disk_hash}" if disk_hash end - def rename_repo(old_full_path: nil, new_full_path: nil) - true - end - private # Generates the hash for the repository path and name on disk diff --git a/app/models/storage/legacy_project.rb b/app/models/storage/legacy_project.rb index 0d12a629b8e..700314e277a 100644 --- a/app/models/storage/legacy_project.rb +++ b/app/models/storage/legacy_project.rb @@ -23,27 +23,5 @@ module Storage def disk_path project.full_path end - - def rename_repo(old_full_path: nil, new_full_path: nil) - old_full_path ||= project.full_path_before_last_save - new_full_path ||= project.build_full_path - - if gitlab_shell.mv_repository(repository_storage, old_full_path, new_full_path) - # If repository moved successfully we need to send update instructions to users. - # However we cannot allow rollback since we moved repository - # So we basically we mute exceptions in next actions - begin - gitlab_shell.mv_repository(repository_storage, "#{old_full_path}.wiki", "#{new_full_path}.wiki") - return true - rescue StandardError => e - Gitlab::AppLogger.error("Exception renaming #{old_full_path} -> #{new_full_path}: #{e}") - # Returning false does not rollback after_* transaction but gives - # us information about failing some of tasks - return false - end - end - - false - end end end |