diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-11 19:16:59 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-11 19:16:59 +0200 |
commit | d64090b8a9065746c6d532057228c079a1d57013 (patch) | |
tree | a97504c15dedfd470d9ffc11c51bd15a6718e8cb /app/models/namespace.rb | |
parent | 8e0b58d7e7cde0d9afb93f267197f62b9b649cd3 (diff) | |
download | gitlab-ce-d64090b8a9065746c6d532057228c079a1d57013.tar.gz |
No gitolite in project any more
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index f17d8f65183..547d383d911 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -31,8 +31,6 @@ class Namespace < ActiveRecord::Base scope :root, where('type IS NULL') - attr_accessor :require_update_gitolite - def self.search query where("name LIKE :query OR path LIKE :query", query: "%#{query}%") end @@ -60,13 +58,13 @@ class Namespace < ActiveRecord::Base end def namespace_full_path - @namespace_full_path ||= File.join(Gitlab.config.gitolite.repos_path, path) + @namespace_full_path ||= File.join(Gitlab.config.gitlab_shell.repos_path, path) end def move_dir if path_changed? - old_path = File.join(Gitlab.config.gitolite.repos_path, path_was) - new_path = File.join(Gitlab.config.gitolite.repos_path, path) + old_path = File.join(Gitlab.config.gitlab_shell.repos_path, path_was) + new_path = File.join(Gitlab.config.gitlab_shell.repos_path, path) if File.exists?(new_path) raise "Already exists" end @@ -81,7 +79,6 @@ class Namespace < ActiveRecord::Base FileUtils.mv( old_path, new_path ) send_update_instructions - @require_update_gitolite = true rescue Exception => e raise "Namespace move error #{old_path} #{new_path}" end @@ -89,7 +86,7 @@ class Namespace < ActiveRecord::Base end def rm_dir - dir_path = File.join(Gitlab.config.gitolite.repos_path, path) + dir_path = File.join(Gitlab.config.gitlab_shell.repos_path, path) FileUtils.rm_r( dir_path, force: true ) end |