##// END OF EJS Templates
events: added more validation of repo type events
super-admin -
r5124:e0800033 default
parent child Browse files
Show More
@@ -130,6 +130,10 b' def _commits_as_dict(event, commit_ids, '
130 # matters we short circuit then.
130 # matters we short circuit then.
131 return []
131 return []
132
132
133 # we failed to remove all needed_commits from all repositories
134 if needed_commits:
135 raise ValueError(f'Unexpectedly not found {needed_commits} in all available repos {repos}')
136
133 missing_commits = set(commit_ids) - set(c['raw_id'] for c in commits)
137 missing_commits = set(commit_ids) - set(c['raw_id'] for c in commits)
134 if missing_commits:
138 if missing_commits:
135 log.error('Inconsistent repository state. '
139 log.error('Inconsistent repository state. '
@@ -298,7 +302,7 b' class RepoVCSEvent(RepoEvent):'
298 def __init__(self, repo_name, extras):
302 def __init__(self, repo_name, extras):
299 self.repo = Repository.get_by_repo_name(repo_name)
303 self.repo = Repository.get_by_repo_name(repo_name)
300 if not self.repo:
304 if not self.repo:
301 raise Exception('repo by this name %s does not exist' % repo_name)
305 raise Exception(f'repo by this name {repo_name} does not exist')
302 self.extras = extras
306 self.extras = extras
303 super().__init__(self.repo)
307 super().__init__(self.repo)
304
308
General Comments 0
You need to be logged in to leave comments. Login now