diff --git a/rhodecode/controllers/pullrequests.py b/rhodecode/controllers/pullrequests.py --- a/rhodecode/controllers/pullrequests.py +++ b/rhodecode/controllers/pullrequests.py @@ -691,6 +691,8 @@ class PullrequestsController(BaseRepoCon c.pull_request, c.rhodecode_user) and not c.pull_request.is_closed() c.allowed_to_merge = PullRequestModel().check_user_merge( c.pull_request, c.rhodecode_user) and not c.pull_request.is_closed() + c.shadow_clone_url = PullRequestModel().get_shadow_clone_url( + c.pull_request) cc_model = ChangesetCommentsModel() diff --git a/rhodecode/model/pull_request.py b/rhodecode/model/pull_request.py --- a/rhodecode/model/pull_request.py +++ b/rhodecode/model/pull_request.py @@ -776,6 +776,9 @@ class PullRequestModel(BaseModel): pull_request_id=pull_request.pull_request_id, qualified=True) + def get_shadow_clone_url(self, pull_request): + return u'{url}/repository'.format(url=self.get_url(pull_request)) + def notify_reviewers(self, pull_request, reviewers_ids): # notification to reviewers if not reviewers_ids: diff --git a/rhodecode/templates/pullrequests/pullrequest_show.html b/rhodecode/templates/pullrequests/pullrequest_show.html --- a/rhodecode/templates/pullrequests/pullrequest_show.html +++ b/rhodecode/templates/pullrequests/pullrequest_show.html @@ -100,6 +100,25 @@ + + ## Clone link of the shadow repository. + %if not c.pull_request.is_closed(): +
+
+ +
+
+
+ %if h.is_hg(c.pull_request.target_repo): + + %elif h.is_git(c.pull_request.target_repo): + + %endif +
+
+
+ %endif +