diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2017-07-22 02:37:22 +0200 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2017-08-01 07:28:13 +0200 |
commit | fb06a4d8fe7bb10c2784f323261cfde04718aec9 (patch) | |
tree | 071469a903785c72a3b06ec60fc8c6ba7f2c7f9e /app/models/project.rb | |
parent | c6dee99803da69af967ef6db2ad84b6fed9ea542 (diff) | |
download | gitlab-ce-fb06a4d8fe7bb10c2784f323261cfde04718aec9.tar.gz |
Rename more path_with_namespace -> full_path or disk_path
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 776b8f4600b..fe85e3e289a 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -480,7 +480,7 @@ class Project < ActiveRecord::Base end def repository - @repository ||= Repository.new(path_with_namespace, self) + @repository ||= Repository.new(full_path, disk_path, self) end def container_registry_url @@ -945,7 +945,7 @@ class Project < ActiveRecord::Base end def url_to_repo - gitlab_shell.url_to_repo(path_with_namespace) + gitlab_shell.url_to_repo(full_path) end def repo_exists? @@ -980,8 +980,9 @@ class Project < ActiveRecord::Base # Expires various caches before a project is renamed. def expire_caches_before_rename(old_path) - repo = Repository.new(old_path, self) - wiki = Repository.new("#{old_path}.wiki", self) + # TODO: if we start using UUIDs for cache, we don't need to do this HACK anymore + repo = Repository.new(old_path, old_path, self) + wiki = Repository.new("#{old_path}.wiki", "#{old_path}.wiki", self) if repo.exists? repo.before_delete @@ -1209,6 +1210,7 @@ class Project < ActiveRecord::Base deploy_keys.where(public: false).delete_all end + # TODO: what to do here when not using Legacy Storage? Do we still need to rename and delay removal? def remove_pages ::Projects::UpdatePagesConfigurationService.new(self).execute |