Rewrite and improve git backend logic. Fix project movind. Raise exception to prevent unexpected issues

This commit is contained in:
Dmitriy Zaporozhets 2012-11-27 09:31:15 +03:00
parent 70bf7f6e19
commit f5551efdfd
20 changed files with 146 additions and 99 deletions

View file

@ -83,7 +83,7 @@ module Repository
end
def path_to_repo
File.join(Gitlab.config.git_base_path, namespace_dir, "#{path}.git")
File.join(Gitlab.config.git_base_path, "#{path_with_namespace}.git")
end
def namespace_dir
@ -165,7 +165,7 @@ module Repository
# Build file path
file_name = self.path + "-" + commit.id.to_s + ".tar.gz"
storage_path = Rails.root.join("tmp", "repositories", self.path)
storage_path = Rails.root.join("tmp", "repositories", self.path_with_namespace)
file_path = File.join(storage_path, file_name)
# Put files into a directory before archiving