Howto work offline with Subversion ================================== Based on http://brosinski.com/stephan/2007/06/20/subversion-repositories-synchronisieren/ thanks Stephan for the basics (German text). An other descriptions found on http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt This text give a short handout to using Subversion repository offline. This mode has one limit: It's one way, you can only read from your mirror. You need Subversion 1.4 or newer. * For better readable I use variables $ BASE=$HOME/svn-repos/colinux-mirror $ MIRROR=file://$BASE $ MASTER=https://colinux.svn.sourceforge.net/svnroot/colinux * Create a new repository on your local PC. (without the prefix "file://" here!) $ svnadmin create $BASE * Create the hook for importing file properties $ cat > $BASE/hooks/pre-revprop-change < $BASE/hooks/pre-revprop-change <&2 exit 1 EOF $ chmod a+x $BASE/hooks/pre-revprop-change $ cat > $BASE/hooks/start-commit <&2 exit 1 EOF $ chmod a+x $BASE/hooks/start-commit Now can only checkout from mirror. The mirror is write protected. To have write access user username in your refresh script: $ svnsync --username svnsync --non-interactive sync file:///$REPOS * Some times svnsyn fails on next call with error: Failed to get lock on destination repos, currently held by 'xxxxxx' * Problem is an entry in revision 0. best way, you delet it: $ svn propdel svn:sync-lock --revprop -r 0 $MIRROR --- Henry N. --- Jan/2010 --- www.henrynestler.com ---