|
|
@ -315,6 +315,17 @@ update
|
|
|
|
#Modified by young
|
|
|
|
#Modified by young
|
|
|
|
# (show_error_not_found; return) unless @entries
|
|
|
|
# (show_error_not_found; return) unless @entries
|
|
|
|
g = Gitlab.client
|
|
|
|
g = Gitlab.client
|
|
|
|
|
|
|
|
# count = 0
|
|
|
|
|
|
|
|
# (0..100).each do |page|
|
|
|
|
|
|
|
|
# if g.commits(@project.gpid,:page => page).count == 0
|
|
|
|
|
|
|
|
# break
|
|
|
|
|
|
|
|
# else
|
|
|
|
|
|
|
|
# count = count + g.commits(@project.gpid,:page => page).count
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#add by hx
|
|
|
|
if g.commits(@project.gpid , :page=>25).count==0
|
|
|
|
if g.commits(@project.gpid , :page=>25).count==0
|
|
|
|
count = count_commits(@project.gpid , 0 , 25)
|
|
|
|
count = count_commits(@project.gpid , 0 , 25)
|
|
|
|
elsif g.commits(@project.gpid , :page=>50).count ==0
|
|
|
|
elsif g.commits(@project.gpid , :page=>50).count ==0
|
|
|
@ -323,8 +334,12 @@ update
|
|
|
|
count = count_commits(@project.gpid , 50 , 75)+ 50 * 20
|
|
|
|
count = count_commits(@project.gpid , 50 , 75)+ 50 * 20
|
|
|
|
elsif g.commits(@project.gpid , :page=>100).count== 0
|
|
|
|
elsif g.commits(@project.gpid , :page=>100).count== 0
|
|
|
|
count = count_commits(@project.gpid , 75 , 100) + 75 * 20
|
|
|
|
count = count_commits(@project.gpid , 75 , 100) + 75 * 20
|
|
|
|
else
|
|
|
|
elsif g.commits(@project.gpid , :page=>125).count==0
|
|
|
|
count = count_commits(@project.gpid , 100 , 125) + 100 * 20
|
|
|
|
count = count_commits(@project.gpid , 100 , 125) + 100 * 20
|
|
|
|
|
|
|
|
elsif g.commits(@project.gpid , :page=>150).count==0
|
|
|
|
|
|
|
|
count = count_commits(@project.gpid , 125 , 150) + 125 * 20
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
count = count_commits(@project.gpid , 150 ,200) + 150 * 20
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
@changesets = g.commits(@project.gpid)
|
|
|
|
@changesets = g.commits(@project.gpid)
|
|
|
@ -353,6 +368,7 @@ update
|
|
|
|
|
|
|
|
|
|
|
|
alias_method :browse, :show
|
|
|
|
alias_method :browse, :show
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#add by hx
|
|
|
|
def count_commits(project_id , left , right)
|
|
|
|
def count_commits(project_id , left , right)
|
|
|
|
count = 0
|
|
|
|
count = 0
|
|
|
|
(left..right).each do |page|
|
|
|
|
(left..right).each do |page|
|
|
|
|