# HG changeset patch # User Mads Kiilerich # Date 2015-01-21 17:35:11 # Node ID fab4e18432bae0f11a9ed3d5c682c2442d2ef007 # Parent 5d5d8ec14aa73704365e6e37a4fff0fc07f25f1f pull request: for available changesets, also show changesets that not are descendants and thus not available but will be merged in diff --git a/kallithea/controllers/pullrequests.py b/kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py +++ b/kallithea/controllers/pullrequests.py @@ -578,7 +578,9 @@ class PullrequestsController(BaseRepoCon avail_revs = org_scm_instance._repo.revs('%s:: & branch(%s)', revs[0], c.cs_branch_name) if len(avail_revs) > 1: # more than just revs[0] - show = set(avail_revs) + # also show changesets that not are descendants but would be merged in + show = set(org_scm_instance._repo.revs('::%ld & !::%s & !::%s', + avail_revs, revs[0], c.a_branch_name)) c.update_msg = _('This pull request can be updated with changes on %s:') % c.cs_branch_name else: show = set() diff --git a/kallithea/templates/pullrequests/pullrequest_show.html b/kallithea/templates/pullrequests/pullrequest_show.html --- a/kallithea/templates/pullrequests/pullrequest_show.html +++ b/kallithea/templates/pullrequests/pullrequest_show.html @@ -189,7 +189,7 @@ ${self.repo_context_bar('showpullrequest ${_("Current revision - no change")} %else: - %if editable: + %if editable and cs.revision in c.avail_revs: ${h.radio(name='updaterev', value=cs.raw_id)} %endif