message:s_("UpdateRepositoryStorage|Error moving repository storage for %{container_full_path} - %{message}")%{container_full_path:container.full_path,message:e.message}
)
end
private
deftrack_repository(destination_shard)
raiseNotImplementedError
end
defmirror_repositories
raiseNotImplementedError
end
defmirror_repository(type:)
unlesswait_for_pushes(type)
raiseError,s_('UpdateRepositoryStorage|Timeout waiting for %{type} repository pushes')%{type:type.name}
end
repository=type.repository_for(container)
full_path=repository.full_path
raw_repository=repository.raw
checksum=repository.checksum
# Initialize a git repository on the target path
new_repository=Gitlab::Git::Repository.new(
destination_storage_name,
raw_repository.relative_path,
raw_repository.gl_repository,
full_path
)
new_repository.replicate(raw_repository)
new_checksum=new_repository.checksum
ifchecksum!=new_checksum
raiseError,s_('UpdateRepositoryStorage|Failed to verify %{type} repository checksum from %{old} to %{new}')%{type:type.name,old:checksum,new:new_checksum}