|
|
|
@ -154,17 +154,14 @@ class PullRequestsController < ApplicationController
|
|
|
|
|
forked_source_project = Project.find(target_project)
|
|
|
|
|
user_name_target = forked_source_project.owner.try(:login)
|
|
|
|
|
git_target_tree = '--git-dir=/home/git/repositories/' + user_name_target + '/' + identifier + '.git'
|
|
|
|
|
git_sourse_commit_id = @g.get_branch_commit_id(@project.gpid, git_source_tree, source_branch)
|
|
|
|
|
git_target_commit_id = @g.get_branch_commit_id(forked_source_project.gpid, git_target_tree, target_branch)
|
|
|
|
|
|
|
|
|
|
git_sourse_commit_id = @g.commis(@project.gpid, :ref => source_branch).first.try(:id)
|
|
|
|
|
git_target_commit_id = @g.commis(forked_source_project.gpid, :ref => target_branch).first.try(:id)
|
|
|
|
|
else
|
|
|
|
|
git_sourse_commit_id = @g.get_branch_commit_id(@project.gpid, git_source_tree, source_branch)
|
|
|
|
|
git_target_commit_id = @g.get_branch_commit_id(@project.gpid, git_source_tree, target_branch)
|
|
|
|
|
end
|
|
|
|
|
Rails.logger.info("=========git_sourse_commit_id========#{git_sourse_commit_id.to_json}")
|
|
|
|
|
Rails.logger.info("=========git_target_commit_id========#{git_target_commit_id.to_json}")
|
|
|
|
|
Rails.logger.info("=========git_sourse_commit_id========#{git_sourse_commit_id.try(:id)}")
|
|
|
|
|
Rails.logger.info("=========git_target_commit_id========#{git_target_commit_id.try(:id)}")
|
|
|
|
|
status = (git_sourse_commit_id.try(:commit_id) == git_target_commit_id.try(:commit_id) ? false : true)
|
|
|
|
|
git_sourse_commit_id = @g.commis(@project.gpid, :ref => source_branch).first.try(:id)
|
|
|
|
|
git_target_commit_id = @g.commis(@project.gpid, :ref => target_branch).first.try(:id)
|
|
|
|
|
end
|
|
|
|
|
status = (git_sourse_commit_id == git_target_commit_id ? false : true)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# @project_menu_type 为了控制base顶部导航
|
|
|
|
|