Set up gerrit remote manually in eol_branch.sh
When a project is retired there is not .gitreview in their repository. If we still need to EOL old branches we need to figure out the gerrit remote. We could get this by checking out an older branch, but to keep it simple we just assume/guess it's review.openstack.org/$project.git Change-Id: I779783cc3f06af28f17ee36a1f0a84df29c4177d
This commit is contained in:
parent
426adf852a
commit
dcf7ae4e37
|
@ -154,7 +154,19 @@ while (( "$#" )); do
|
|||
fi
|
||||
|
||||
pushd $project
|
||||
git review -s
|
||||
|
||||
if ! git config remote.$REMOTE.url >/dev/null 2>&1; then
|
||||
if ! [ -f .gitreview ]; then
|
||||
# Work around projects with missing .gitreview files. This usually
|
||||
# happens when a probject is no longer maintained.
|
||||
user=`git config --global gitreview.username`
|
||||
warning_message "Guessing remote manually"
|
||||
git remote add $REMOTE ssh://$user@review.openstack.org:29418/$project.git
|
||||
else
|
||||
git review -s
|
||||
fi
|
||||
fi
|
||||
|
||||
git remote update --prune
|
||||
|
||||
if ! git rev-parse remotes/$REMOTE/$BRANCH >/dev/null 2>&1; then
|
||||
|
|
Loading…
Reference in New Issue