Mercurial > kallithea
changeset 4787:fab4e18432ba
pull request: for available changesets, also show changesets that not are descendants and thus not available but will be merged in
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 21 Jan 2015 17:35:11 +0100 |
parents | 5d5d8ec14aa7 |
children | bfc304687f1c |
files | kallithea/controllers/pullrequests.py kallithea/templates/pullrequests/pullrequest_show.html |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/pullrequests.py Wed Jan 21 17:35:11 2015 +0100 +++ b/kallithea/controllers/pullrequests.py Wed Jan 21 17:35:11 2015 +0100 @@ -578,7 +578,9 @@ 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()
--- a/kallithea/templates/pullrequests/pullrequest_show.html Wed Jan 21 17:35:11 2015 +0100 +++ b/kallithea/templates/pullrequests/pullrequest_show.html Wed Jan 21 17:35:11 2015 +0100 @@ -189,7 +189,7 @@ <td colspan="2">${_("Current revision - no change")}</td> %else: <td> - %if editable: + %if editable and cs.revision in c.avail_revs: ${h.radio(name='updaterev', value=cs.raw_id)} %endif </td>