diff --git a/rhodecode/events/repo.py b/rhodecode/events/repo.py --- a/rhodecode/events/repo.py +++ b/rhodecode/events/repo.py @@ -130,6 +130,10 @@ def _commits_as_dict(event, commit_ids, # matters we short circuit then. return [] + # we failed to remove all needed_commits from all repositories + if needed_commits: + raise ValueError(f'Unexpectedly not found {needed_commits} in all available repos {repos}') + missing_commits = set(commit_ids) - set(c['raw_id'] for c in commits) if missing_commits: log.error('Inconsistent repository state. ' @@ -298,7 +302,7 @@ class RepoVCSEvent(RepoEvent): def __init__(self, repo_name, extras): self.repo = Repository.get_by_repo_name(repo_name) if not self.repo: - raise Exception('repo by this name %s does not exist' % repo_name) + raise Exception(f'repo by this name {repo_name} does not exist') self.extras = extras super().__init__(self.repo)