ensure branch validation checks out a copy of the repo

For tagless repos, we won't already have a copy, so check it out in
the branch validation.

Change-Id: Ief4f6bdb5c7207dbb56e4c53b8e63be8e3df61a2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-08-11 11:59:52 -04:00
parent 9fb4b20f95
commit bcf3494950

View File

@ -653,6 +653,17 @@ def validate_stable_branches(deliverable_info, workdir,
# The other rules aren't going to be testable, so skip them.
continue
for repo, loc in sorted(location.items()):
# Ensure we have a local copy of the repository so we
# can scan for values that are more difficult to get
# remotely.
try:
gitutils.clone_repo(workdir, repo, loc)
except Exception as err:
mk_error('Could not clone repository %s at %s: %s' % (
repo, loc, err))
# No point in running extra checks if we can't
# clone the repository.
continue
if not is_a_hash(loc):
mk_error(
('tagless stable branches should be created '