From 1d8e811892ac51a9451e0ea417d0f574c57821c6 Mon Sep 17 00:00:00 2001 From: Joshua Hesketh Date: Tue, 18 Jul 2017 22:23:41 +1000 Subject: [PATCH] Handle unknown projects in eol_branch The script assumes you have all of openstack checked out. However for new repos (or presumably all) we can easily clone it if we don't have it. Clearly this is very inefficient, but it is simply how this script works for now. Change-Id: I0d0ab73da6d4e93172be94178652c5aa28d7dcdb --- eol_branch.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/eol_branch.sh b/eol_branch.sh index ad9b69f..a80e89e 100755 --- a/eol_branch.sh +++ b/eol_branch.sh @@ -131,12 +131,18 @@ while (( "$#" )); do shift if ! [ -d $project/.git ]; then - echo "$project is not a git repo" - echo "skipping..." - continue + if ! [ -d $project ]; then + echo "$project not found on filesystem. Will attempt to clone" + $DEBUG git clone git://git.openstack.org/$project $project + else + echo "$project is not a git repo" + echo "skipping..." + continue + fi fi pushd $project + git review -s git remote update --prune if ! git rev-parse remotes/$REMOTE/$BRANCH >/dev/null 2>&1; then