|
|
@ -354,17 +354,16 @@ update
|
|
|
|
|
|
|
|
|
|
|
|
def get_commits(id)
|
|
|
|
def get_commits(id)
|
|
|
|
g = Gitlab.client
|
|
|
|
g = Gitlab.client
|
|
|
|
tmp_commit = g.commits(id,page:0)
|
|
|
|
tmp_commit_count = g.commits(id,page:0).count
|
|
|
|
commits = []
|
|
|
|
commit_count = 0
|
|
|
|
i=0
|
|
|
|
i=0
|
|
|
|
while tmp_commit!=[]
|
|
|
|
while tmp_commit_count!=0
|
|
|
|
commits = commits+tmp_commit
|
|
|
|
commit_count = commit_count+tmp_commit_count
|
|
|
|
i=i+1
|
|
|
|
i=i+1
|
|
|
|
tmp_commit = g.commits(id,page:i)
|
|
|
|
tmp_commit_count = g.commits(id,page:i).count
|
|
|
|
end
|
|
|
|
end
|
|
|
|
commits_count = commits.length
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return commits_count
|
|
|
|
return commit_count
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -377,7 +376,7 @@ update
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@commits = g.commits(@project.gpid, page:(params[:page].to_i - 1).to_s)
|
|
|
|
@commits = g.commits(@project.gpid, page:(params[:page].to_i - 1).to_s)
|
|
|
|
@commits_count = get_commits(@project.gpid)
|
|
|
|
@commits_count = params[:commit_count].to_i
|
|
|
|
@commits_pages = Redmine::Pagination::Paginator.new @commits_count,limit,params[:page]
|
|
|
|
@commits_pages = Redmine::Pagination::Paginator.new @commits_count,limit,params[:page]
|
|
|
|
|
|
|
|
|
|
|
|
@commit = g.commit(@project.gpid,@rev)
|
|
|
|
@commit = g.commit(@project.gpid,@rev)
|
|
|
|