Project -> update repo only on create and destroy. Fixtures Updated with namespaces. Fixed moving repo

This commit is contained in:
Dmitriy Zaporozhets 2012-11-21 08:54:05 +03:00
parent cc52eed981
commit 70bf7f6e19
11 changed files with 45 additions and 31 deletions

View file

@ -254,6 +254,10 @@ class Project < ActiveRecord::Base
old_dir = old_namespace.try(:path) || ''
new_dir = new_namespace.try(:path) || ''
old_repo = File.join(old_dir, self.path)
git_host.move_repository(old_repo, self.path_with_namespace, self)
Gitlab::ProjectMover.new(self, old_dir, new_dir).execute
save!