diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py index 1e3a937..bbaed0c 100644 --- a/pagure/ui/fork.py +++ b/pagure/ui/fork.py @@ -277,11 +277,16 @@ def request_pull_patch(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) branch = repo_obj.lookup_branch(request.branch_from)