Checkout zuul_newrev if it exists.

This logic was in gerrit-git-prep but was erroneously removed.

Change-Id: I76b5dc8acf3e16c4659427d1f6f4f638a5e49791
Reviewed-on: https://review.openstack.org/18488
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
James E. Blair 2012-12-20 08:28:27 -08:00 committed by Jenkins
parent 08b0cb94dc
commit 2bb68e8d61

View File

@ -35,7 +35,14 @@ git remote update || git remote update # attempt to work around bug #925790
git reset --hard
git clean -x -f -d -q
git fetch $GIT_SITE/p/$ZUUL_PROJECT $ZUUL_REF
git checkout FETCH_HEAD
git reset --hard FETCH_HEAD
git clean -x -f -d -q
if [ -z "$ZUUL_NEWREV" ]
then
git fetch $GIT_SITE/p/$ZUUL_PROJECT $ZUUL_REF
git checkout FETCH_HEAD
git reset --hard FETCH_HEAD
git clean -x -f -d -q
else
git checkout $ZUUL_NEWREV
git reset --hard $ZUUL_NEWREV
git clean -x -f -d -q
fi