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

@ -26,6 +26,13 @@ module Gitlab
config.update_project!(project.path, project)
end
def move_repository(old_repo, new_repo, project)
config.apply do |config|
config.clean_repo(old_repo)
config.update_project(new_repo, project)
end
end
def remove_repository project
config.destroy_project!(project)
end

View file

@ -83,7 +83,11 @@ module Gitlab
def destroy_project(project)
FileUtils.rm_rf(project.path_to_repo)
conf.rm_repo(project.path)
conf.rm_repo(project.path_with_namespace)
end
def clean_repo repo_name
conf.rm_repo(repo_name)
end
def destroy_project!(project)