From: Geoffrey Thomas Date: Sun, 27 Dec 2009 09:24:49 +0000 (-0500) Subject: svn-hooks: Add a zephyr revprop hook and comment commit-zephyr a bit. X-Git-Url: https://snippets.scripts.mit.edu/gitweb.cgi/Scripts/git/.git/commitdiff_plain/b4a486e448c584edd2b0b12f0449d8c1d44baf05 svn-hooks: Add a zephyr revprop hook and comment commit-zephyr a bit. --- diff --git a/svn-hooks/commit-zephyr b/svn-hooks/commit-zephyr index ca88266..b3f2f19 100755 --- a/svn-hooks/commit-zephyr +++ b/svn-hooks/commit-zephyr @@ -1,4 +1,13 @@ #!/bin/bash +# +# This is a script that can be called from a Subversion post-commit hook +# to zephyr a summary of the commit or the full commit. +# +# Use by putting something like the following in hooks/post-commit: +# REPOS="$1" +# REV="$2" +# /mit/snippets/svn-hooks/commit-zephyr "$REPOS" "$REV" -c scripts +# /mit/snippets/svn-hooks/commit-zephyr "$REPOS" "$REV" --full -c scripts-auto -i commits CLASS=test INSTANCE=@ diff --git a/svn-hooks/zephyr-post-revprop-change b/svn-hooks/zephyr-post-revprop-change new file mode 100755 index 0000000..b7d90b5 --- /dev/null +++ b/svn-hooks/zephyr-post-revprop-change @@ -0,0 +1,11 @@ +#!/bin/sh + +REPOS="$1" +REV="$2" +USER="$3" +PROPNAME="$4" +OLD_VAL="$(cat)" +NEW_VAL="$(svnlook propget --revprop -r "$REV" "$REPOS" "$PROPNAME")" +#export PATH="/usr/bin:/bin" + +(echo "$USER @(@color(red)changing revprop) @b($PROPNAME)"; echo "from: $OLD_VAL"; echo "to: $NEW_VAL") | zwrite -d -c test -i "r$REV"