From 24e217dd5a5a959a0de034f9944982313ffdf57d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 21 2015 10:15:03 +0000 Subject: Adjust request_pull to be able to display remote pull-requests --- diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py index 0c60780..b9b4d76 100644 --- a/pagure/ui/fork.py +++ b/pagure/ui/fork.py @@ -194,11 +194,16 @@ def request_pull(repo, requestid, username=None): if not request: flask.abort(404, 'Pull-request not found') - repo_from = request.project_from - repopath = pagure.get_repo_path(repo_from) - repo_obj = pygit2.Repository(repopath) + if request.remote: + repopath = pagure.get_remote_repo_path( + request.remote_git, request.branch_from) + parentpath = pagure.get_repo_path(request.project) + else: + repo_from = request.project_from + repopath = pagure.get_repo_path(repo_from) + parentpath = _get_parent_repo_path(repo_from) - parentpath = _get_parent_repo_path(repo_from) + repo_obj = pygit2.Repository(repopath) orig_repo = pygit2.Repository(parentpath) diff_commits = []