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}
raiseError,s_('UpdateRepositoryStorage|Failed to verify %{type} repository checksum from %{old} to %{new}')%{type: type.name,old: checksum,new: new_checksum}
rescueProjects::HousekeepingService::LeaseTaken
end
# No action required
end
end
defremove_old_paths
defremove_old_paths
ifproject.repository_exists?
super
Gitlab::Git::Repository.new(
source_storage_name,
"#{project.disk_path}.git",
nil,
nil
).remove
end
ifproject.wiki.repository_exists?
ifproject.wiki.repository_exists?
Gitlab::Git::Repository.new(
Gitlab::Git::Repository.new(
...
@@ -119,31 +59,5 @@ module Projects
...
@@ -119,31 +59,5 @@ module Projects
).remove
).remove
end
end
end
end
# The underlying FetchInternalRemote call uses a `git fetch` to move data
# to the new repository, which leaves it in a less-well-packed state,
# lacking bitmaps and commit graphs. Housekeeping will boost performance