# HG changeset patch # User Thomas De Schampheleire # Date 2018-11-10 21:34:57 # Node ID 9de5c174a37c5a97caec77c1d28425ddeaa0e4e4 # Parent 0dac14c83d9f22321c1b3830e25dcd335dba3d79 controllers: changeset: always allow status changes Don't disallow status changes on changesets that are part of a pull request and on which the last status change happened via the pull request. This odd restriction was already previously highlighted by Mads Kiilerich as 'RLY?' in commit 7834f845505aec3086f525600c81209a40b495ef, so it seems fair to remove it. When dont_allow_on_closed_pull_request no longer is set, StatusChangeOnClosedPullRequestError will no longer be raised. diff --git a/kallithea/controllers/changeset.py b/kallithea/controllers/changeset.py --- a/kallithea/controllers/changeset.py +++ b/kallithea/controllers/changeset.py @@ -47,7 +47,6 @@ from kallithea.model.comment import Chan from kallithea.model.changeset_status import ChangesetStatusModel from kallithea.model.meta import Session from kallithea.model.repo import RepoModel -from kallithea.lib.exceptions import StatusChangeOnClosedPullRequestError from kallithea.lib.vcs.backends.base import EmptyChangeset from kallithea.lib.utils2 import safe_unicode from kallithea.lib.graphmod import graph_data @@ -388,20 +387,13 @@ class ChangesetController(BaseRepoContro # get status if set ! if status: - # if latest status was from pull request and it's closed - # disallow changing status ! RLY? - try: - ChangesetStatusModel().set_status( - c.db_repo.repo_id, - status, - request.authuser.user_id, - c.comment, - revision=revision, - dont_allow_on_closed_pull_request=True, - ) - except StatusChangeOnClosedPullRequestError: - log.debug('cannot change status on %s with closed pull request', revision) - raise HTTPBadRequest() + ChangesetStatusModel().set_status( + c.db_repo.repo_id, + status, + request.authuser.user_id, + c.comment, + revision=revision, + ) action_logger(request.authuser, 'user_commented_revision:%s' % revision,