summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-03 11:23:21 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-03 11:23:21 +0000
commit7dc8b6b2045d84ff232731ef92f2cac916732753 (patch)
tree6ab9df705d3c3383b081f31952a98ba58957bcc3 /lib/tasks
parent25bb39225e073c451d76e7a7ddb9dedef8d43143 (diff)
parenta0586dbc165cc09422412149712a218938137308 (diff)
downloadgitlab-ce-7dc8b6b2045d84ff232731ef92f2cac916732753.tar.gz
Merge branch 'fwn-to-find-by-full-path' into 'master'
replace `find_with_namespace` with `find_by_full_path` See merge request !8949
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/cleanup.rake2
-rw-r--r--lib/tasks/gitlab/import.rake2
-rw-r--r--lib/tasks/gitlab/sidekiq.rake2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/tasks/gitlab/cleanup.rake b/lib/tasks/gitlab/cleanup.rake
index 4a696a52b4d..967f630ef20 100644
--- a/lib/tasks/gitlab/cleanup.rake
+++ b/lib/tasks/gitlab/cleanup.rake
@@ -58,7 +58,7 @@ namespace :gitlab do
sub(%r{^/*}, '').
chomp('.git').
chomp('.wiki')
- next if Project.find_with_namespace(repo_with_namespace)
+ next if Project.find_by_full_path(repo_with_namespace)
new_path = path + move_suffix
puts path.inspect + ' -> ' + new_path.inspect
File.rename(path, new_path)
diff --git a/lib/tasks/gitlab/import.rake b/lib/tasks/gitlab/import.rake
index 036a9307ab5..b4015f5238e 100644
--- a/lib/tasks/gitlab/import.rake
+++ b/lib/tasks/gitlab/import.rake
@@ -29,7 +29,7 @@ namespace :gitlab do
next
end
- project = Project.find_with_namespace(path)
+ project = Project.find_by_full_path(path)
if project
puts " * #{project.name} (#{repo_path}) exists"
diff --git a/lib/tasks/gitlab/sidekiq.rake b/lib/tasks/gitlab/sidekiq.rake
index 7e2a6668e59..f2e12d85045 100644
--- a/lib/tasks/gitlab/sidekiq.rake
+++ b/lib/tasks/gitlab/sidekiq.rake
@@ -7,7 +7,7 @@ namespace :gitlab do
unless args.project.present?
abort "Please specify the project you want to drop PostReceive jobs for:\n rake gitlab:sidekiq:drop_post_receive[group/project]"
end
- project_path = Project.find_with_namespace(args.project).repository.path_to_repo
+ project_path = Project.find_by_full_path(args.project).repository.path_to_repo
Sidekiq.redis do |redis|
unless redis.exists(QUEUE)