我有一個可用的Subversion Post Commit工作正常 - 我如何在用戶執行提交時所做的註釋中添加?如何將提交註釋添加到Subversion提交後鉤子
我的代碼是
REPOS="$1"
REV="$2"
AUTHOR="$(svnlook author -r $REV $REPOS)"
mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
# Script to send simple email when SVN is updated
# email subject
SUBJECT="[Project Name goes here] - new commit made in Subversion"
# Email To
EMAIL="[email addresses go here]"
# Date and time
DATE="$(date)"
# Email text/message
EMAILMESSAGE="/tmp/buildingcontrolmessage.txt"
echo "The commit happened: " $DATE > $EMAILMESSAGE
echo "Repository: " $1 >> $EMAILMESSAGE
echo "Reveision: " $2 >> $EMAILMESSAGE
echo "The commit was made by: $AUTHOR" >> $EMAILMESSAGE
# send an email using /bin/mail
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
我只是想添加一行在電子郵件說:
echo "Comment: $MSG" >> $EMAILMESSAGE
但我不知道如何從得到的消息提交。
感謝您的任何幫助和建議。
沒關係,這是比較容易的方式... :)但也許還加上'-r $ REV'來電。 – mellow