Commit d0f3b504 authored by Michal Čihař's avatar Michal Čihař

Configure repository with lock held

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 75d99aa5
......@@ -667,13 +667,14 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
if self.is_repo_link:
return
self.repository.configure_remote(self.repo, self.push, self.branch)
self.repository.set_committer(
self.committer_name,
self.committer_email
)
with self.repository_lock:
self.repository.configure_remote(self.repo, self.push, self.branch)
self.repository.set_committer(
self.committer_name,
self.committer_email
)
self.update_remote_branch(validate)
self.update_remote_branch(validate)
def configure_branch(self):
'''
......@@ -682,7 +683,8 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
if self.is_repo_link:
return
self.repository.configure_branch(self.branch)
with self.repository_lock:
self.repository.configure_branch(self.branch)
def do_update(self, request=None, method=None):
'''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment