Commit d2aa48c0d5e49309b14baa5f2f792af945e74bb3

Authored by Dmitriy Zaporozhets
1 parent 79b76d2c

Recreate project satellite on rename or transfer

app/models/project.rb
@@ -421,6 +421,7 @@ class Project < ActiveRecord::Base @@ -421,6 +421,7 @@ class Project < ActiveRecord::Base
421 begin 421 begin
422 gitlab_shell.mv_repository("#{old_path_with_namespace}.wiki", "#{new_path_with_namespace}.wiki") 422 gitlab_shell.mv_repository("#{old_path_with_namespace}.wiki", "#{new_path_with_namespace}.wiki")
423 gitlab_shell.rm_satellites(old_path_with_namespace) 423 gitlab_shell.rm_satellites(old_path_with_namespace)
  424 + ensure_satellite_exists
424 send_move_instructions 425 send_move_instructions
425 rescue 426 rescue
426 # Returning false does not rollback after_* transaction but gives 427 # Returning false does not rollback after_* transaction but gives
app/services/project_transfer_service.rb
@@ -29,6 +29,9 @@ class ProjectTransferService @@ -29,6 +29,9 @@ class ProjectTransferService
29 # Move wiki repo also if present 29 # Move wiki repo also if present
30 gitlab_shell.mv_repository("#{old_path}.wiki", "#{new_path}.wiki") 30 gitlab_shell.mv_repository("#{old_path}.wiki", "#{new_path}.wiki")
31 31
  32 + # create satellite repo
  33 + project.ensure_satellite_exists
  34 +
32 true 35 true
33 end 36 end
34 end 37 end