diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 03:09:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 03:09:08 +0300 |
commit | f54a50aa826d0eedcf2e56f51462613bc132f826 (patch) | |
tree | 7194aca23f9af822ea55966a6f477b3d8d68ee47 /app/services/repositories | |
parent | c77fda905a8619b756163c10a75171dc9cfe7084 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/repositories')
-rw-r--r-- | app/services/repositories/base_service.rb | 8 | ||||
-rw-r--r-- | app/services/repositories/destroy_service.rb | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/services/repositories/base_service.rb b/app/services/repositories/base_service.rb index 6a39399c791..a99a65b7edb 100644 --- a/app/services/repositories/base_service.rb +++ b/app/services/repositories/base_service.rb @@ -7,8 +7,8 @@ class Repositories::BaseService < BaseService attr_reader :repository - delegate :project, :disk_path, :full_path, to: :repository - delegate :repository_storage, to: :project + delegate :container, :disk_path, :full_path, to: :repository + delegate :repository_storage, to: :container def initialize(repository) @repository = repository @@ -31,7 +31,7 @@ class Repositories::BaseService < BaseService # gitlab/cookies.git -> gitlab/cookies+119+deleted.git # def removal_path - "#{disk_path}+#{project.id}#{DELETED_FLAG}" + "#{disk_path}+#{container.id}#{DELETED_FLAG}" end # If we get a Gitaly error, the repository may be corrupted. We can @@ -40,7 +40,7 @@ class Repositories::BaseService < BaseService def ignore_git_errors(&block) yield rescue Gitlab::Git::CommandError => e - Gitlab::GitLogger.warn(class: self.class.name, project_id: project.id, disk_path: disk_path, message: e.to_s) + Gitlab::GitLogger.warn(class: self.class.name, container_id: container.id, disk_path: disk_path, message: e.to_s) end def move_error(path) diff --git a/app/services/repositories/destroy_service.rb b/app/services/repositories/destroy_service.rb index 374968f610e..b12d0744387 100644 --- a/app/services/repositories/destroy_service.rb +++ b/app/services/repositories/destroy_service.rb @@ -14,11 +14,11 @@ class Repositories::DestroyService < Repositories::BaseService log_info(%Q{Repository "#{disk_path}" moved to "#{removal_path}" for repository "#{full_path}"}) current_repository = repository - project.run_after_commit do + container.run_after_commit do Repositories::ShellDestroyService.new(current_repository).execute end - log_info("Project \"#{project.full_path}\" was removed") + log_info("Repository \"#{full_path}\" was removed") success else |