changing source url of the svn repository replica

i have bunch of svn read-only replicas. they were created using:

# all to be executed on the server that will become a replica
mkdir /path/to/local/replica/on/this/server 
svnadmin create /path/to/local/replica/on/this/server 
cd /path/to/local/replica/on/this/server 
chmod +x hooks/pre-revprop-change
chmod +x hooks/start-commit

echo -e '#!/bin/bash\nexit 0' > hooks/pre-revprop-change
echo -e '#!/bin/bash\nexit 0' > hooks/start-commit

svnsync initialize file:///path/to/local/replica/on/this/server --source-username=user_with_access_to_source_repo --source-password=password_of_that_user --sync-username username_in_the_local_repo
# note that during the initial sync you need to have 

replication [ fetching of earlier not downloaded revisions ] is done via:

svnsync --non-interactive sync file:///path/to/local/replica/on/this/server/ --source-username=user_with_access_to_source_repo --source-password=password_of_that_user 

to check from which url my replica repo fetches updates:

svnlook pg --revprop -r0 /path/to/local/replica/on/this/server/ svn:sync-from-url

to change it – run:

echo -n '' > /tmp/url
svnadmin setrevprop /path/to/local/replica/on/this/server -r0 svn:sync-from-url /tmp/url

that’s it – next execution of svnsync will fetch the data from the new origin url

based on:

Leave a Reply

Your email address will not be published. Required fields are marked *


(Spamcheck Enabled)