# HG changeset patch # User Mads Kiilerich # Date 2015-09-16 02:54:32 # Node ID 9416093966a0b929afb9a80645a4f2de8be32c50 # Parent 0fa831892e32502ac000deed7facf786bfe535ce pull requests: skip 'This pull request has already been merged' check for ranges; they have been "merged" to the ancestor from the beginning diff --git a/kallithea/controllers/pullrequests.py b/kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py +++ b/kallithea/controllers/pullrequests.py @@ -591,7 +591,7 @@ class PullrequestsController(BaseRepoCon # candidates: descendants of old head that are on the right branch # and not are the old head itself ... # and nothing at all if old head is a descendant of target ref name - if other_scm_instance._repo.revs('present(%s)::&%s', c.cs_ranges[-1].raw_id, c.a_branch_name): + if not c.is_range and other_scm_instance._repo.revs('present(%s)::&%s', c.cs_ranges[-1].raw_id, c.a_branch_name): c.update_msg = _('This pull request has already been merged to %s.') % c.a_branch_name elif c.pull_request.is_closed(): c.update_msg = _('This pull request has been closed and can not be updated.')