From cf9895ea3121d13e83cb3248cbba826ee3995b04 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 18 Sep 2012 14:29:22 -0700 Subject: [PATCH] Propose translations based on master. Previously if an existing transifex translation change was present the translation proposal script would make changes against that change. git-review would break and this ends up not actually proposing changes that we want. To correct this get the change id of the existing change and use that in the commit message for changes based off of master. This gives us translations based on the latest code with the benefits of less noise in gerrit. Change-Id: I88bf13193c6541806388dd610c68e0a95205973e Reviewed-on: https://review.openstack.org/13233 Reviewed-by: James E. Blair Approved: Clark Boylan Reviewed-by: Clark Boylan Tested-by: Jenkins --- .../propose_translation_update.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/jenkins/files/slave_scripts/propose_translation_update.sh b/modules/jenkins/files/slave_scripts/propose_translation_update.sh index bdf0563b3f..0b59d51d35 100755 --- a/modules/jenkins/files/slave_scripts/propose_translation_update.sh +++ b/modules/jenkins/files/slave_scripts/propose_translation_update.sh @@ -1,6 +1,7 @@ #!/bin/bash -xe PROJECT=$1 +COMMIT_MSG="Imported Translations from Transifex" git config user.name "OpenStack Jenkins" git config user.email "jenkins@openstack.org" @@ -9,11 +10,16 @@ git config gitreview.username "jenkins" git review -s # See if there is an open change in the transifex/translations topic -# If so, amend the commit with new changes since then -previous=`ssh -p 29418 review.openstack.org gerrit query --current-patch-set status:open project:openstack/$PROJECT topic:transifex/translations | grep "^ number:" | awk '{print $2}'` +# If so, get the change id for the existing change for use in the commit msg. +change_info=`ssh -p 29418 review.openstack.org gerrit query --current-patch-set status:open project:openstack/$PROJECT topic:transifex/translations owner:jenkins` +previous=`echo "$change_info" | grep "^ number:" | awk '{print $2}'` if [ "x${previous}" != "x" ] ; then - git review -d ${previous} - amend="--amend" + change_id=`echo "$change_info" | grep "^change" | awk '{print $2}'` + read -d '' COMMIT_MSG <