Check that the target branch exists
* propose_requirements_update.sh: Look before we leap. Don't descend into the project repository and try to check out a branch without first making sure it exists on the origin. Change-Id: Ib4de5bdf8bf5cf134e3307755617456f282d790d
This commit is contained in:
parent
5ad56c346e
commit
dde1d73058
@ -56,8 +56,10 @@ EOF
|
|||||||
PROJECT_DIR=$(basename $PROJECT)
|
PROJECT_DIR=$(basename $PROJECT)
|
||||||
rm -rf $PROJECT_DIR
|
rm -rf $PROJECT_DIR
|
||||||
git clone ssh://$USERNAME@review.openstack.org:29418/$PROJECT.git
|
git clone ssh://$USERNAME@review.openstack.org:29418/$PROJECT.git
|
||||||
|
|
||||||
pushd $PROJECT_DIR
|
pushd $PROJECT_DIR
|
||||||
|
|
||||||
|
# make sure the project even has this branch
|
||||||
|
if git branch -a | grep -q "^ remotes/origin/$BRANCH$" ; then
|
||||||
git checkout $BRANCH
|
git checkout $BRANCH
|
||||||
git review -s
|
git review -s
|
||||||
if [ -n "$change_id" ] ; then
|
if [ -n "$change_id" ] ; then
|
||||||
@ -79,6 +81,7 @@ $COMMIT_MSG
|
|||||||
EOF
|
EOF
|
||||||
git review -t $TOPIC $BRANCH
|
git review -t $TOPIC $BRANCH
|
||||||
fi
|
fi
|
||||||
popd
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user