git-hooks/contrib/buildbot.git/hooks/update | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-)
New commits: commit c0545eff5f50cb2932c9b34ed00e6aaf09740d67 Author: Miklos Vajna <vmik...@suse.cz> Date: Wed May 15 11:06:46 2013 +0200 git-hooks: sync core -> buildbot hook Change-Id: If9481f340fad1263b00b4a467b265fdabeae9c7c diff --git a/git-hooks/contrib/buildbot.git/hooks/update b/git-hooks/contrib/buildbot.git/hooks/update index c935005..ac84fcf 100755 --- a/git-hooks/contrib/buildbot.git/hooks/update +++ b/git-hooks/contrib/buildbot.git/hooks/update @@ -14,6 +14,7 @@ if [ "$(id -u -n )" != "logerrit" ] ; then echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2 exit 1 fi +from="$(git show -s --pretty=format:'%an <%ae>' $3^{})" project=$(cat $GIT_DIR/description) recipients="libreoffice-comm...@lists.freedesktop.org" @@ -47,8 +48,9 @@ date_format="%F %R %z" num_path_components=2 # Set subject +repo=$(basename $(cd $GIT_DIR ; pwd)) if expr "$2" : '0*$' >/dev/null ; then - subject="Changes to '${1##refs/heads/}'" + subject="$repo: Changes to '${1##refs/heads/}'" else base=$(git-merge-base "$2" "$3") subject=$(git-diff-tree -r --name-only "$base" "$3" | @@ -61,6 +63,7 @@ else if [ "$branch" != "master" ] ; then subject="Branch '$branch' - $subject" fi + subject="$repo: $subject" fi if expr "$2" : '0*$' >/dev/null @@ -109,7 +112,22 @@ else echo "Rebased ref, commits from common ancestor:" ;; esac - git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done + bytes=0 + IFS="$(echo)" + git-rev-list "$3" "^$base" | while read rev; do git-show -M $rev; done | sed 's#\\#\\\\#g' | + while read line + do + if [ "$bytes" -ge "0" ] ; then + bytes=$(( $bytes + ${#line} + 1 )) + if [ "$bytes" -gt "100000" ] ; then + bytes=-1 + echo -e "\n... etc. - the rest is truncated" + else + echo "$line" + fi + fi + done fi | -mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients +mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/libreoffice/contrib/buildbot.git" \ + -a "List-Post: <mailto:libreoffice@lists.freedesktop.org>" -a "From: $from" $recipients exit 0 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits