summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-11 14:33:31 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-11 14:33:31 +0200
commit3e259ea8bc198b7a5c67bd1e03dc9d44c7dd5854 (patch)
treef726369d15ae21d54272c586a30db4102817af6e /app/models/project.rb
parentc0bf026ed8253e9bf749546e40f968dbc20aaac1 (diff)
downloadgitlab-ce-3e259ea8bc198b7a5c67bd1e03dc9d44c7dd5854.tar.gz
Revert "Merge branch 'revert-satellites' into 'master' "
This reverts commit 5daf44b7c86e0e2641a902b1da8b01d91fa3dbfa, reversing changes made to 2f706fbd231cabe7a76a5d17ac44285aaaf8592c.
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 3dc1729e812..4628f478ca6 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -520,14 +520,6 @@ class Project < ActiveRecord::Base
!repository.exists? || repository.empty?
end
- def ensure_satellite_exists
- self.satellite.create unless self.satellite.exists?
- end
-
- def satellite
- @satellite ||= Gitlab::Satellite::Satellite.new(self)
- end
-
def repo
repository.raw
end
@@ -597,14 +589,11 @@ class Project < ActiveRecord::Base
new_path_with_namespace = File.join(namespace_dir, path)
if gitlab_shell.mv_repository(old_path_with_namespace, new_path_with_namespace)
- # If repository moved successfully we need to remove old satellite
- # and send update instructions to users.
+ # If repository moved successfully we need to send update instructions to users.
# However we cannot allow rollback since we moved repository
# So we basically we mute exceptions in next actions
begin
gitlab_shell.mv_repository("#{old_path_with_namespace}.wiki", "#{new_path_with_namespace}.wiki")
- gitlab_shell.rm_satellites(old_path_with_namespace)
- ensure_satellite_exists
send_move_instructions
reset_events_cache
rescue
@@ -702,7 +691,6 @@ class Project < ActiveRecord::Base
def create_repository
if forked?
if gitlab_shell.fork_repository(forked_from_project.path_with_namespace, self.namespace.path)
- ensure_satellite_exists
true
else
errors.add(:base, 'Failed to fork repository via gitlab-shell')