diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-21 08:54:05 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-21 08:54:05 +0300 |
commit | 70bf7f6e191c0e99ad03e1eec2ecbe2aae53fa09 (patch) | |
tree | 9ff90fbd30aa5386a543b770b0566aebb599b698 /lib | |
parent | cc52eed9816edb513482ec0db428e46c0bdce4c5 (diff) | |
download | gitlab-ce-70bf7f6e191c0e99ad03e1eec2ecbe2aae53fa09.tar.gz |
Project -> update repo only on create and destroy. Fixtures Updated with namespaces. Fixed moving repo
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/backend/gitolite.rb | 7 | ||||
-rw-r--r-- | lib/gitlab/backend/gitolite_config.rb | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/gitlab/backend/gitolite.rb b/lib/gitlab/backend/gitolite.rb index 6d88b92bdd2..79fe150c19c 100644 --- a/lib/gitlab/backend/gitolite.rb +++ b/lib/gitlab/backend/gitolite.rb @@ -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 diff --git a/lib/gitlab/backend/gitolite_config.rb b/lib/gitlab/backend/gitolite_config.rb index 396d4329505..c000aab0aa9 100644 --- a/lib/gitlab/backend/gitolite_config.rb +++ b/lib/gitlab/backend/gitolite_config.rb @@ -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) |