版本库路径唯一

This commit is contained in:
huang 2016-09-28 16:51:25 +08:00
parent bd383f5010
commit 25b2602d3e
1 changed files with 4 additions and 4 deletions

View File

@ -410,11 +410,11 @@ update
@zip_path = Gitlab.endpoint.to_s + "/projects/" + @project.gpid.to_s + "/repository/archive?&private_token=" + Gitlab.private_token
# 获取版本库路径主要分为两种一种随Gitlab类型另一种为Git类型Git类型为无用数据最终需要删掉这种类型。
if @repository.type.to_s == "Repository::Gitlab"
# if @repository.type.to_s == "Repository::Gitlab"
@repos_url = gitlab_address.to_s+"/" + @creator + "/" + @repository.identifier+"."+"git"
else
@repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s + @repository.url.slice(project_path_cut, @repository.url.length).to_s
end
# else
# @repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s + @repository.url.slice(project_path_cut, @repository.url.length).to_s
# end
render :action => 'show', :layout => 'base_projects'
end
end