Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2017-06-14 16:21:51 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-06-26 18:49:30 +0300
commit8c850380a9908542c50c7dc1226bf99274eb48e6 (patch)
tree0e4ac145cbf35e2e08eaa116ee2605cf1be9c174 /lib/gitlab/database/rename_reserved_paths_migration
parent171f2d97dcc508ff6031248c6f78fc8ba75e939c (diff)
Add punctuation to log messages
Diffstat (limited to 'lib/gitlab/database/rename_reserved_paths_migration')
-rw-r--r--lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb5
-rw-r--r--lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb2
-rw-r--r--lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb3
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
index 060203fda12..68dd6f9a5b3 100644
--- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
+++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
@@ -145,8 +145,9 @@ module Gitlab
yield(path_before_rename, path_after_rename)
rescue StandardError => e
failed_reverts << rename_info
- say "Renaming #{type} from back to #{path_before_rename} failed. "\
- "Review the error and try again by running the `down` action. \n"\
+ say "Renaming #{type} from #{path_after_rename} back to "\
+ "#{path_before_rename} failed. Review the error and try "\
+ "again by running the `down` action. \n"\
"#{e.message}: \n #{e.backtrace.join("\n")}"
end
end
diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb
index f85f2d90f02..05b86f32ce2 100644
--- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb
+++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb
@@ -50,7 +50,7 @@ module Gitlab
rename_namespace_dependencies(namespace, current_path, path_before_rename)
else
- say "Couldn't rename namespace from #{current_path} back to #{path_before_rename} "\
+ say "Couldn't rename namespace from #{current_path} back to #{path_before_rename}, "\
"namespace was renamed, or no longer exists at the expected path"
end
end
diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb
index 8f00e957f85..75a75f61953 100644
--- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb
+++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb
@@ -33,12 +33,13 @@ module Gitlab
matches_path = MigrationClasses::Route.arel_table[:path].matches(current_path)
project = MigrationClasses::Project.joins(:route)
.where(matches_path).first
+
if project
perform_rename(project, current_path, path_before_rename)
move_project_folders(project, current_path, path_before_rename)
else
- say "Couldn't rename Project from #{current_path} back to "\
+ say "Couldn't rename project from #{current_path} back to "\
"#{path_before_rename}, project was renamed or no longer "\
"exists at the expected path."