Commit d2aa48c0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Recreate project satellite on rename or transfer

parent 79b76d2c
...@@ -421,6 +421,7 @@ class Project < ActiveRecord::Base ...@@ -421,6 +421,7 @@ class Project < ActiveRecord::Base
begin begin
gitlab_shell.mv_repository("#{old_path_with_namespace}.wiki", "#{new_path_with_namespace}.wiki") gitlab_shell.mv_repository("#{old_path_with_namespace}.wiki", "#{new_path_with_namespace}.wiki")
gitlab_shell.rm_satellites(old_path_with_namespace) gitlab_shell.rm_satellites(old_path_with_namespace)
ensure_satellite_exists
send_move_instructions send_move_instructions
rescue rescue
# Returning false does not rollback after_* transaction but gives # Returning false does not rollback after_* transaction but gives
......
...@@ -29,6 +29,9 @@ class ProjectTransferService ...@@ -29,6 +29,9 @@ class ProjectTransferService
# Move wiki repo also if present # Move wiki repo also if present
gitlab_shell.mv_repository("#{old_path}.wiki", "#{new_path}.wiki") gitlab_shell.mv_repository("#{old_path}.wiki", "#{new_path}.wiki")
# create satellite repo
project.ensure_satellite_exists
true true
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment