summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <ken-oomichi@wx.jp.nec.com>2015-09-25 04:39:57 +0000
committerKen'ichi Ohmichi <ken-oomichi@wx.jp.nec.com>2015-09-28 06:09:55 +0000
commit59408c92533b83aa1361967b9d5bc430234f0bcd (patch)
tree115b0ecadc42b4a4526af0544b90236e3cae0c05
parent6757c130b97974754b4a18518ee7598920ce1f8b (diff)
downloadtempest-lib-59408c92533b83aa1361967b9d5bc430234f0bcd.tar.gz
Remove file path from migration commit msg
migrate_from_tempest.sh creates a commit for migrating code from Tempest, but the commit message becomes long and redundant because of containing file paths. Then now developers need to remove them by hands. This patch makes the script remove file paths. In addition, this patch makes the script add the blueprint msg "Partially implements blueprint migrate-service-clients-to-tempest-lib" for managing these tasks on gerrit. Change-Id: If8fc115dea67f779a86d33d26ac56cc8540a8c0f
-rwxr-xr-xtools/migrate_from_tempest.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/migrate_from_tempest.sh b/tools/migrate_from_tempest.sh
index 8d9d6a4..778f549 100755
--- a/tools/migrate_from_tempest.sh
+++ b/tools/migrate_from_tempest.sh
@@ -53,7 +53,8 @@ cd $tmpdir
for file in $files; do
# Get the latest change-id for each file
change_id=`git log -n1 --grep "Change-Id: " -- $file | grep "Change-Id: " | awk '{print $2}'`
- CHANGE_LIST=`echo -e "$CHANGE_LIST\n * $file: $change_id"`
+ filename=`basename $file`
+ CHANGE_LIST=`echo -e "$CHANGE_LIST\n * $filename: $change_id"`
done
# Move files and commit
@@ -102,4 +103,9 @@ rm -rf $tmpdir
commit_message="Migrated $file_list from tempest"
pre_list=$"This migrates the above files from tempest. This includes tempest commits:"
post_list=$"to see the commit history for these files refer to the above Change-Ids in the tempest repository"
-git commit -m "$commit_message" -m "$pre_list" -m "$CHANGE_LIST" -m "$post_list"
+if [ $service_client -eq 1 ]; then
+ bp_msg="Partially implements blueprint migrate-service-clients-to-tempest-lib"
+else
+ bp_msg=""
+fi
+git commit -m "$commit_message" -m "$pre_list" -m "$CHANGE_LIST" -m "$post_list" -m "$bp_msg"