|
|
|
@ -271,11 +271,37 @@ update
|
|
|
|
|
|
|
|
|
|
alias_method :browse, :show
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#add by houxiang
|
|
|
|
|
|
|
|
|
|
def get_commits(id)
|
|
|
|
|
g = Gitlab.client
|
|
|
|
|
tmp_commit = g.commits(id,page:0)
|
|
|
|
|
commits = []
|
|
|
|
|
i=0
|
|
|
|
|
while tmp_commit!=[]
|
|
|
|
|
commits = commits+tmp_commit
|
|
|
|
|
i=i+1
|
|
|
|
|
tmp_commit = g.commits(id,page:i)
|
|
|
|
|
end
|
|
|
|
|
commits_count = commits.length
|
|
|
|
|
|
|
|
|
|
return commits_count
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def changes
|
|
|
|
|
@entry = @repository.entry(@path, @rev)
|
|
|
|
|
(show_error_not_found; return) unless @entry
|
|
|
|
|
g = Gitlab.client
|
|
|
|
|
@commits = g.commits(@project.gpid, page:params[:page])
|
|
|
|
|
limit = 20
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@commits = g.commits(@project.gpid, page:(params[:page].to_i - 1).to_s)
|
|
|
|
|
@commits_count = get_commits(@project.gpid)
|
|
|
|
|
@commits_pages = Redmine::Pagination::Paginator.new @commits_count,limit,params[:page]
|
|
|
|
|
|
|
|
|
|
@commit = g.commit(@project.gpid,@rev)
|
|
|
|
|
# @changesets = g.get ("/projects/#{@project.gpid}/repository/commits?#{@rev}")
|
|
|
|
|
#@changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i)
|
|
|
|
|