Lines Matching refs:repo
45 def parse_ssh_path(repo): argument
51 match = re.search('^ssh://(.*?)(/.*)$', repo)
56 "Incorrect SSH path in global_config: %s" % repo)
59 def repo_run_command(repo, cmd, ignore_status=False, cd=True): argument
61 repo = repo.strip()
64 if repo.startswith('ssh://'):
66 hostline, remote_path = parse_ssh_path(repo)
77 cd_str = 'cd %s && ' % repo
84 def create_directory(repo): argument
85 remote_path = repo
86 if repo.startswith('ssh://'):
87 _, remote_path = parse_ssh_path(repo)
88 repo_run_command(repo, 'mkdir -p %s' % remote_path, cd=False)
91 def check_diskspace(repo, min_free=None): argument
98 df = repo_run_command(repo,
108 def check_write(repo): argument
111 repo_run_command(repo, 'touch %s' % repo_testfile).stdout.strip()
112 repo_run_command(repo, 'rm ' + repo_testfile)
114 raise error.RepoWriteError('Unable to write to ' + repo)
117 def trim_custom_directories(repo, older_than_days=None): argument
118 if not repo:
125 repo_run_command(repo, cmd, ignore_status=True)
308 def add_repository(self, repo): argument
309 if isinstance(repo, six.string_types):
310 self.repositories.append(self.get_fetcher(repo))
311 elif isinstance(repo, RepositoryFetcher):
312 self.repositories.append(repo)
343 def repo_check(self, repo): argument
349 if not repo.startswith('/') and not repo.startswith('ssh:'):
352 create_directory(repo)
353 check_diskspace(repo)
354 check_write(repo)
357 raise error.RepoError("ERROR: Repo %s: %s" % (repo, e))
500 repo_url_list = [repo.url for repo in repositories]