svn-hooks: Add a zephyr revprop hook and comment commit-zephyr a bit.
authorGeoffrey Thomas <geofft@mit.edu>
Sun, 27 Dec 2009 09:24:49 +0000 (04:24 -0500)
committerGeoffrey Thomas <geofft@mit.edu>
Sun, 27 Dec 2009 09:24:49 +0000 (04:24 -0500)
svn-hooks/commit-zephyr
svn-hooks/zephyr-post-revprop-change [new file with mode: 0755]

index ca882667156c4b90934172c2006ee04408a52bcf..b3f2f19b1ab068e629bbf268c0de080c16fc4ee3 100755 (executable)
@@ -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 (executable)
index 0000000..b7d90b5
--- /dev/null
@@ -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"