Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def clone_missing(self) -> None:
to_clone = []
for repo in self.get_repos():
repo_path = self.root_path / repo.src
if not repo_path.exists():
to_clone.append(repo)
cloner = Cloner(self.root_path, shallow=self.config.shallow_clones)
tsrc.executor.run_sequence(to_clone, cloner)
def set_remotes(self) -> None:
remote_setter = RemoteSetter(self.root_path)
tsrc.executor.run_sequence(self.get_repos(), remote_setter)
def sync(self, *, force: bool = False) -> None:
syncer = Syncer(self.root_path, force=force)
try:
tsrc.executor.run_sequence(self.get_repos(), syncer)
finally:
syncer.display_bad_branches()
def copy_files(self) -> None:
file_copier = FileCopier(self.root_path)
manifest = self.local_manifest.get_manifest()
copyfiles = manifest.copyfiles
tsrc.executor.run_sequence(copyfiles, file_copier)