Mercurial > kallithea
changeset 4433:dacbd7f15ba2
pull requests: clarify message about unrelated changes that can't be used for updating PR
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 12 Aug 2014 13:08:23 +0200 |
parents | 3c534752f2f4 |
children | 00c76c4e019c |
files | kallithea/controllers/pullrequests.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/pullrequests.py Tue Aug 12 13:08:23 2014 +0200 +++ b/kallithea/controllers/pullrequests.py Tue Aug 12 13:08:23 2014 +0200 @@ -241,8 +241,10 @@ else: c.update_msg = _('No changesets found for updating this pull request.') - if org_scm_instance._repo.revs('head() & not (%s::) & branch(%s)', revs[0], c.org_branch_name): - c.update_msg_other = _('Note: Branch %s also contains unrelated changes.') % c.org_branch_name + revs = org_scm_instance._repo.revs('head() & not (%s::) & branch(%s) & !closed()', revs[0], c.org_branch_name) + if revs: + c.update_msg_other = _('Note: Branch %s also contains unrelated changes, such as %s.') % (c.org_branch_name, + h.short_id(org_scm_instance.get_changeset((max(revs))).raw_id)) else: c.update_msg_other = _('Branch %s does not contain other changes.') % c.org_branch_name