From b4a486e448c584edd2b0b12f0449d8c1d44baf05 Mon Sep 17 00:00:00 2001 From: Geoffrey Thomas Date: Sun, 27 Dec 2009 04:24:49 -0500 Subject: [PATCH] svn-hooks: Add a zephyr revprop hook and comment commit-zephyr a bit. --- svn-hooks/commit-zephyr | 9 +++++++++ svn-hooks/zephyr-post-revprop-change | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100755 svn-hooks/zephyr-post-revprop-change 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" -- 2.44.0