don't clone a repo if it already exists
The validation command in particular ends up cloning the same repo repeatedly. Skip the extra work by checking to see if it already exists. Change-Id: If56f03be03e37116edb8ee9443c9ab286c9bbdd9 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
f904e596b7
commit
bf23735c4a
@ -56,6 +56,9 @@ def commit_exists(repo, ref):
|
||||
|
||||
def clone_repo(workdir, repo):
|
||||
"Check out the code."
|
||||
dest = os.path.join(workdir, repo)
|
||||
if os.path.exists(dest):
|
||||
return
|
||||
cmd = [
|
||||
'zuul-cloner',
|
||||
'--workspace', workdir,
|
||||
|
Loading…
x
Reference in New Issue
Block a user