Skip to content

Instantly share code, notes, and snippets.

@mortonfox
Created February 27, 2019 04:17
Show Gist options
  • Save mortonfox/0229142ac6fd046623f3993e50d53656 to your computer and use it in GitHub Desktop.
Save mortonfox/0229142ac6fd046623f3993e50d53656 to your computer and use it in GitHub Desktop.
[Backup SVN Repository] #svn #backup
svnadmin create twitvim
vim twitvim/hooks/pre-revprop-change
--- Contents of pre-revprop-change ----
#!/bin/sh
USER="$3"
if [ "$USER" = "svnsync" ]; then exit 0; fi
echo "Only the svnsync user can change revprops" >&2
exit 1
--- Contents of pre-revprop-change ----
chmod +x twitvim/hooks/pre-revprop-change
svnsync init --username svnsync file://"`pwd`"/twitvim http://twitvim.googlecode.com/svn/trunk/
svnsync sync file://"`pwd`"/twitvim
svnadmin dump twitvim > twitvim.dump
zip -9qr twitvim.zip twitvim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment