Don't like ads? PRO users don't see any ads ;-)
Guest

Daniel Trebbien

By: a guest on Sep 13th, 2010  |  syntax: Bash  |  size: 0.53 KB  |  hits: 49  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #! /usr/bin/env sh
  2. TEST=test3
  3. rm -Rf ${TEST}_mirror
  4. svnadmin create ${TEST}_mirror
  5. cat <<'EOF' > ${TEST}_mirror/hooks/pre-revprop-change
  6. #! /usr/bin/env sh
  7. USER="$3"
  8.  
  9. if [ "$USER" = "svnsync" ]; then exit 0; fi
  10.  
  11. echo "Only the svnsync user can change revprops" >&2
  12. exit 1
  13. EOF
  14. chmod +x ${TEST}_mirror/hooks/pre-revprop-change
  15. svnsync init --username svnsync --source-encoding ISO-8859-1 file://`pwd`/${TEST}_mirror file://`pwd`/${TEST}
  16. svnsync sync --username svnsync --source-encoding ISO-8859-1 file://`pwd`/${TEST}_mirror