Merge branch 'develop' of http://repository.trustie.net/xianbo/trustie2 into develop

This commit is contained in:
sw 2015-07-23 08:59:16 +08:00
commit 7cf837d0bf
1 changed files with 12 additions and 1 deletions

View File

@ -484,7 +484,18 @@ update
if params[:repository_id].present?
@repository = @project.repositories.find_by_identifier_param(params[:repository_id])
else
@repository = @project.repository
# 多版本库,如果一个版本库为空则去下一个
rep_count = @project.repositories.count
if @project.repository.nil?
for i in 0..rep_count
unless @project.repositories[i].nil?
@repository = @project.repositories[i]
break
end
end
else
@repository = @project.repository
end
end
(render_404; return false) unless @repository
@path = params[:path].is_a?(Array) ? params[:path].join('/') : params[:path].to_s