diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2017-08-08 11:53:52 +0200 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2017-08-22 06:33:20 +0200 |
commit | 95a270c87104e1225d4c29a54611f5e4f7a76b56 (patch) | |
tree | 97b3d0033d1d0efa5a1dc64adab530b71ae3d8c5 /app/models/storage | |
parent | 47d3ea01bbc197e6ec8c566f287961cef2ec1cb6 (diff) | |
download | gitlab-ce-95a270c87104e1225d4c29a54611f5e4f7a76b56.tar.gz |
Fix repository reloading in some specs
Diffstat (limited to 'app/models/storage')
-rw-r--r-- | app/models/storage/hashed_project.rb | 4 | ||||
-rw-r--r-- | app/models/storage/legacy_project.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/models/storage/hashed_project.rb b/app/models/storage/hashed_project.rb index 364794a4eef..91f74b084b6 100644 --- a/app/models/storage/hashed_project.rb +++ b/app/models/storage/hashed_project.rb @@ -47,11 +47,11 @@ module Storage project.send_move_instructions(old_path_with_namespace) - @old_path_with_namespace = old_path_with_namespace + project.old_path_with_namespace = old_path_with_namespace SystemHooksService.new.execute_hooks_for(project, :rename) - @repository = nil + project.reload_repository! rescue => e Rails.logger.error "Exception renaming #{old_path_with_namespace} -> #{new_path_with_namespace}: #{e}" # Returning false does not rollback after_* transaction but gives diff --git a/app/models/storage/legacy_project.rb b/app/models/storage/legacy_project.rb index 57c340075ba..b7b073ad077 100644 --- a/app/models/storage/legacy_project.rb +++ b/app/models/storage/legacy_project.rb @@ -52,11 +52,11 @@ module Storage project.send_move_instructions(old_path_with_namespace) project.expires_full_path_cache - @old_path_with_namespace = old_path_with_namespace + project.old_path_with_namespace = old_path_with_namespace SystemHooksService.new.execute_hooks_for(project, :rename) - @repository = nil + project.reload_repository! rescue => e Rails.logger.error "Exception renaming #{old_path_with_namespace} -> #{new_path_with_namespace}: #{e}" # Returning false does not rollback after_* transaction but gives |