Fix rfc.sh's check for the project

From 'git remote show origin' we get 'openstack/nova.git' but gerrit's
ls-projects returns 'openstack/nova'

Change-Id: I4ea6361633d0e94895dbbdaf3837f12c6c307bfc
This commit is contained in:
Mark McLoughlin 2011-09-23 12:14:20 +01:00
parent 37100f5653
commit 48bc6645da

View File

@ -48,13 +48,13 @@ add_remote()
if project_list=`ssh -p29418 -o StrictHostKeyChecking=no $username@review.openstack.org gerrit ls-projects 2>/dev/null`
then
echo "$username@review.openstack.org:29418 worked."
if echo $project_list | grep $project >/dev/null
if echo $project_list | grep -w "${project%.git}" >/dev/null
then
echo "Creating a git remote called gerrit that maps to:"
echo " ssh://$username@review.openstack.org:29418/$project"
git remote add gerrit ssh://$username@review.openstack.org:29418/$project
else
echo "The current project name, $project, is not a known project."
echo "The current project name, ${project%.git}, is not a known project."
echo "Please either reclone from github/gerrit or create a"
echo "remote named gerrit that points to the intended project."
return 1