| ... | @@ -59,7 +59,10 @@ class Namespace < ActiveRecord::Base |
... | @@ -59,7 +59,10 @@ class Namespace < ActiveRecord::Base |
|
|
if File.exists?(new_path)
|
|
if File.exists?(new_path)
|
|
|
raise "Already exists"
|
|
raise "Already exists"
|
|
|
end
|
|
end
|
|
|
system("mv #{old_path} #{new_path}")
|
|
|
|
|
|
if system("mv #{old_path} #{new_path}")
|
|
|
|
send_update_instructions
|
|
|
|
end
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
|
|
|
| ... | @@ -67,4 +70,8 @@ class Namespace < ActiveRecord::Base |
... | @@ -67,4 +70,8 @@ class Namespace < ActiveRecord::Base |
|
|
dir_path = File.join(Gitlab.config.gitolite.repos_path, path)
|
|
dir_path = File.join(Gitlab.config.gitolite.repos_path, path)
|
|
|
system("rm -rf #{dir_path}")
|
|
system("rm -rf #{dir_path}")
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
def send_update_instructions
|
|
|
|
projects.each(&:send_move_instructions)
|
|
|
|
end
|
|
|
end |
|
end |