fs2json: directory structure -> json object converter.
E.g. to be used instead of erica / py-Couchapp (interaction with couchdb is left to the user).
#!/bin/sh
# See: http://push.cx/2007/seeing-subversion-diffs-for-commit-messages
#
REALSVN=/usr/bin/svn
ARGS="$@"
if [ "$1" = "commit" -o "$1" = "ci" ]; then
shift # pop off $1 for diff
TEMPLATE=`mktemp --tmpdir svn-ci.XXXXXXX`
$REALSVN diff "$@" > "$TEMPLATE"
$REALSVN $ARGS --editor-cmd="$HOME/bin/svn-diff-editor '$TEMPLATE'"
else
$REALSVN $ARGS
fi