
Daniel Trebbien
By: a guest on
Sep 13th, 2010 | syntax:
Bash | size: 0.53 KB | hits: 49 | expires: Never
#! /usr/bin/env sh
TEST=test3
rm -Rf ${TEST}_mirror
svnadmin create ${TEST}_mirror
cat <<'EOF' > ${TEST}_mirror/hooks/pre-revprop-change
#! /usr/bin/env sh
USER="$3"
if [ "$USER" = "svnsync" ]; then exit 0; fi
echo "Only the svnsync user can change revprops" >&2
exit 1
EOF
chmod +x ${TEST}_mirror/hooks/pre-revprop-change
svnsync init --username svnsync --source-encoding ISO-8859-1 file://`pwd`/${TEST}_mirror file://`pwd`/${TEST}
svnsync sync --username svnsync --source-encoding ISO-8859-1 file://`pwd`/${TEST}_mirror