Monday, January 30, 2012
Mirroring Subversion Repository
Create a new repository to be the mirror:
· svnadmin create MIRROR_CONTAINER
· Create a "pre-revprop-change" action by creating a hook script by the same name.
o Go to MIRROR_CONTAINER\hooks.
o create a file named pre-revprop-change.bat
o The contents will be as follows
Change the <<SVN USER>> to the user who will be performing the sync
IF "%3" == "<<SVN USER>>" (goto :label1) else (echo "Only the syncuser user may change revision properties" >&2 )
· Save this file
· Initialize a path within the repository to contain the mirrored data, and specify the source by
o If the path has spaces then enlose them with the double quotes
o For example my remote repository (MIRROR_CONTAINER) was in my shared folder so I use like the following
· svnsync init --username <<SVN USER>> file:///"<<MIRROR_CONTAINER>>" <<BASE SVN location>> svn://220.127.116.11:48000/UFG
· svnsync sync --username <<SVN USER>> file:///"<<MIRROR_CONTAINER>>"