My Quotes


When U were born , you cried and the world rejoiced
Live U'r life in such a way that when you go
THE WORLD SHOULD CRY






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 )

exit 1

goto :eof

:label1

exit 0

·         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://162.66.224.77:48000/UFG

·         svnsync sync --username <<SVN USER>> file:///"<<MIRROR_CONTAINER>>"

No comments :