From: Quentin Smith Date: Thu, 26 Aug 2010 01:04:53 +0000 (-0400) Subject: Improve zephyr notifications X-Git-Tag: 0.1.11~1 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/commitdiff_plain/e1b80beac24d1ebdd7afebf073248e03b5d2bdcc Improve zephyr notifications --- diff --git a/debian/changelog b/debian/changelog index feb6cba..4d07161 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-dev (0.1.10) unstable; urgency=low + + * Improve zephyr notifications + + -- Quentin Smith Wed, 25 Aug 2010 21:04:43 -0400 + invirt-dev (0.1.9.1) unstable; urgency=low * Revert 0.1.9: our sbuild is not new enough to support that. diff --git a/git-hooks/sub/zephyr-post-receive b/git-hooks/sub/zephyr-post-receive index da91abe..3cb2086 100755 --- a/git-hooks/sub/zephyr-post-receive +++ b/git-hooks/sub/zephyr-post-receive @@ -14,6 +14,10 @@ instance=$(invirt-getconf "$base.instance" 2>/dev/null) zsig=$(invirt-getconf "$base.zsig" 2>/dev/null) color=$(invirt-getconf "$base.color" 2>/dev/null) +# Git hooks are always called with PWD == GIT_DIR. +repo=${PWD#/srv/git/} +repo=${repo%/.git} + if [ "${color:-true}" = "true" ]; then usecolor="--color" else @@ -29,8 +33,8 @@ fi while read oldrev newrev refname; do if [ "$oldrev" = "0000000000000000000000000000000000000000" ]; then # dammit git - zwrite -c "$class" -i "$(basename "$refname")" -s "${zsig:-Git}: $refname" -d \ - -m "New branch created." + zwrite -c "$class" -i "$repo" -s "${zsig:-Git}: $refname" -d \ + -m "New branch ${refname#refs/heads/} created." continue fi git rev-list --first-parent --reverse "$oldrev..$newrev" | while read rev; do @@ -44,6 +48,6 @@ while read oldrev newrev refname; do -e 's/\[32m/@color(green)/g' \ -e '1s/^/@{/' \ -e '$s/$/}/') | - zwrite -c "$class" -i "${instance:-$shortrev}" -s "${zsig:-Git}: $refname" -d + zwrite -c "$class" -i "${instance:-$repo/$shortrev}" -s "${zsig:-Git}: $refname" -d done done