Commit 45845717 authored by Henrik Skov Midtiby's avatar Henrik Skov Midtiby

For operations that target individual repositories, only visit each repository once.

parent e9963dfe
......@@ -124,7 +124,7 @@ class GitlabClassHelper:
Push local repository to list of remote empty repositories
"""
use_group_id, _ = self.check_group_id(group_id)
for repo in repositories:
for repo in set(repositories):
repo_id = self.get_repo_id(repo, use_group_id)
self.push_git_repository_content_to_project(local_path, repo_id)
print('Pushed git repo "%s" to "%s"' % (local_path, repo))
......@@ -190,7 +190,7 @@ class GitlabClassHelper:
Clone all repositories in "repositories" to the local path "local_path_to_fetch_to"
"""
use_group_id, _ = self.check_group_id(group_id)
for repo in repositories:
for repo in set(repositories):
local_path = os.path.join(local_path_to_fetch_to, repo)
repo_id = self.get_repo_id(repo, use_group_id)
print('Cloning the repository "%s" to "%s"' % (repo, local_path))
......@@ -209,7 +209,7 @@ class GitlabClassHelper:
Push repositories to remotes.
"""
use_group_id, _ = self.check_group_id(group_id)
for repo in repositories:
for repo in set(repositories):
repo_id = self.get_repo_id(repo, use_group_id)
path_to_repo = os.path.join(local_path, repo)
self.push_git_repository_content_to_project(path_to_repo, repo_id)
......
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